Numeral-js
Numeral-js copied to clipboard
NaN returned if value < 1e-6
I need my app to display formatted values less than 0.00000100. However numeral returns NaN
for such values.
Here are reproducible test cases:
console.log(`1e-8, ${numeral(1e-8).format('0,0.00000000')}`) //output: NaN
console.log(`1e-7, ${numeral(1e-7).format('0,0.00000000')}`) //output: NaN
console.log(`9e-7, ${numeral(9e-7).format('0,0.00000000')}`) //output: NaN
console.log(`9.999999e-7, ${numeral(9.999999e-7).format('0,0.00000000')}`) //output: NaN
console.log(`1e-6, ${numeral(1e-6).format('0,0.00000000')}`) //output: 0.00000100
Please fix this. Thank you.
I have the same problem. Everything below e-6 is not working. Any ideas how to fix this?
This is a duplicate of #514 and #512. There are already several pull requests to fix it.
@thmaterna @RaviDasari @JasonRammoray @adamwdraper Any update on the status of this issue?
There are 2 open issues, #512 and #563, and 2 PRs #564 and #514 open to fix this issue.
@adamwdraper would you be able to review #564? @thmaterna has noted #514 will not cover all cases.
unfortunately, no update from @adamwdraper
Has this repository been abandoned? We need a new maintainer to fix this problem that I still experience (and any other problems).
@tab00 see #431
Have you tried numbro?
fuck