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

totalLength invokes average even when not wanted #625

Open
anthonymannion opened this issue Dec 3, 2021 · 0 comments · May be fixed by #631
Open

totalLength invokes average even when not wanted #625

anthonymannion opened this issue Dec 3, 2021 · 0 comments · May be fixed by #631

Comments

@anthonymannion
Copy link

I am looking for values such as 1.2345, 12.123, 123.45, 1234.5, 12345 being returned with the same format, depending on the number of digits provided on the "whole number" side.

The following works up to 123.45343 type values:
numbro(123.45343).format({ totalLength: 5 }); = 123.45

but for larger numbers, it starts invoking the "average" functionality, even though I have not specified to use it.
numbro(1234.5343).format({ totalLength: 5 }); = 1.2345k, when I am looking for 1234.5.

Can totalLength and average be separated functionally? or average: false allowed?

@AlisaLC AlisaLC linked a pull request Dec 25, 2021 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant