Skip to content
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

Double suffix under certain conditions #20

Closed
fuzzything44 opened this issue Oct 9, 2017 · 1 comment
Closed

Double suffix under certain conditions #20

fuzzything44 opened this issue Oct 9, 2017 · 1 comment

Comments

@fuzzything44
Copy link

I haven't really done much testing to isolate the issue, but numberformat.formatShort(999999, { sigfigs: 3 }); returns the string "1.00e+3K". (I'm formatting 1M - 1, getting I guess a million just written very strangely)

@erosson
Copy link
Owner

erosson commented Dec 2, 2017

Should be fixed in the next release (0.4.0). The prefix was rounding up into a form that created a second prefix. It should now always round down, so 999999 is "999K".

Thanks for reporting this!

@erosson erosson closed this as completed in 6b9111a Dec 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants