-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add option to disable commifying in dn.format
function
#4
Comments
Good point, I think it would be nice to have this. I am wondering how to do it, as the name From what I understand, your case is that you need to store the numbers somewhere as a string, but in a way that is a bit more flexible than Since we already have let value = [123456789000000000000000n, 18];
toString(value); // "123456.789"
toString(value, 1); // "123456.8" What do you think? |
I made a PR with the change: #5 |
This is perfect, thanks! We're moving away from |
Awesome! It’s published: https://github.com/bpierre/dnum/releases/tag/v2.9.0 |
The
dn.format
function currently always commifies numbers by default. It would be beneficial to have an option to turn this behavior off. This would provide greater flexibility in formatting number strings and improve the interoperability betweendn.from
anddn.format
.The text was updated successfully, but these errors were encountered: