-
Notifications
You must be signed in to change notification settings - Fork 264
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
Support optional rounding #170
base: main
Are you sure you want to change the base?
Conversation
@leerob Is anyone going through PRs on this repo? |
Yes, our current focus right now with |
All right. I'll see if I can change the target branch from master to canary 👍 |
Those changes have been merged into Thumbs up on this PR could be a good way to indicate how many people would like to see this feature land 👍 |
I see. Thank you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After reviewing this code, I have found nothing wrong with it. It provides the ability to round using any amount and shouldn't cause any problems. I have tested this code multiple times with no error and feel there is no reason the commit not be merged to the main branch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works
I had renamed the package to deploy it to my npm account. This should not be changed in the upstream.
Deleted since repository uses pnpm
Current conflicts have been resolved. I've also fixed some issues, having to do with the package name and lock file, since I had been using this package myself, deployed to npm. |
This PR enables rounding through the
round
option.round
defaults to true and current solutions will continue to behave the same.When
round
is set to false, all rounding is disabled.When
round
is set to a number, it is used as precision fortoFixed
.