For example numeral(0.0000000048).format('0') // NaN
Same issue, appears to be any number with 6 or more leading 0s.
numeral(.0000001).format('0')
> "NaN"
numeral(.000001).format('0')
> "0"
numeral(.0000005).format('0')
> "NaN"
numeral(.0000009).format('0')
> "NaN"
numeral(.0000010).format('0')
> "0"
numeral(.0000015).format('0')
> "0"
Incidentally, that appears to be when the chrome console starts displaying numbers in exponential form.
.000001
> 0.000001
.0000001
> 1e-7
I downgraded to 1.5.6 to avoid this bug.
Is this duplicate of #512 ?
Same for large and exponential number format.
As a workaround I suggest downgrade to 2.0.4
2.0.6: https://jsfiddle.net/xkp1wmb4/
2.0.4: https://jsfiddle.net/d9pfv4na/2/
I've seen at least three PRs in the queue addressing this issue
Still baffled that the PR's fixing this have not been merged
Still baffled that the PR's fixing this have not been merged
Unfortunately the last commit was 4 years ago. The author probably doesn't have time any more for this project.
Most helpful comment
Same issue, appears to be any number with 6 or more leading 0s.
Incidentally, that appears to be when the chrome console starts displaying numbers in exponential form.