Numeral-js
Numeral-js copied to clipboard
NaN Formatting
BUG: Please follow the steps;
var n=numeral(103.15 - 203.48 + 100.33); // returns a {_input: 1.4210854715202004e-14, _value: 1.4210854715202004e-14}
n.format("0,0.00"); // returns NaN
It seems that it cannot format exponential numbers (in JS by default from 0.0000001 = e-7).
Same bug numeral(1e-15).format('0') // returns NaN
I downgraded to 2.0.4