Skip to content
This repository has been archived by the owner on May 15, 2023. It is now read-only.

Avoid unnecessary decimals or use a suffix (fix #59 and #190) #207

Merged
merged 2 commits into from
Sep 22, 2020

Conversation

niccord
Copy link
Contributor

@niccord niccord commented Sep 18, 2020

As the title suggests.
Thanks to this, you can set a avoidEmptyDecimals string to use as a suffix in case decimals are zeros.
If you set an empty string, it does not display the decimal separator nor the zeros.
If avoidEmptyDecimals is not set, so null or undefined (which is the default) it follows the current behaviour.

@mazipan
Copy link
Owner

mazipan commented Sep 19, 2020

Can you update the docs on the readme and the demo page as well to cover this case?

Copy link
Owner

@mazipan mazipan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm

@mazipan
Copy link
Owner

mazipan commented Sep 21, 2020

One question @niccord, is this breaking old version of safe to release as a minor update?

@niccord
Copy link
Contributor Author

niccord commented Sep 21, 2020

The default value of the field is undefined which preserves the current behaviour, so this can be released as a minor update IMO.

@mazipan mazipan merged commit 5a4686f into mazipan:master Sep 22, 2020
@mazipan
Copy link
Owner

mazipan commented Sep 22, 2020

Released on 5.2.0

@mazipan
Copy link
Owner

mazipan commented Sep 22, 2020

@all-contributors please add @niccord for code

@allcontributors
Copy link
Contributor

@mazipan

I've put up a pull request to add @niccord! 🎉

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants