-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Different Handling for Negative "-" and Positive "+" Signs #9
Comments
Mottie
added a commit
that referenced
this issue
Mar 13, 2018
Resolve #9 - Different Handling for Negative "-" and Positive "+" Signs
I did find one issue in the code, not your additions. I'm not sure why it didn't pop up before; but if you pass a // Fix the decimal first, toFixed will auto fill trailing zero.
value = (+value).toFixed(mask[1] && mask[1].length); I'll add a test for this in the rewrite. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello
Thanks for the great done job with this library, it is really the only stable and solid solution I could find for Javascript and the code is a state of art, easy to follow and well tested.
I would like to propose a different handling for negative and positive signs
The Current behavior
The New Behavior
Examples compares between the new and the old behavior :
The new behavior makes more sense than the old one and it is less confusing. Of course such a change will not be a BC but I believe It’s worth it
I will send a PR for this feature and I hope it will be merged
The text was updated successfully, but these errors were encountered: