You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 13, 2026. It is now read-only.
I found this repo while searching for a fork that fixed the Numeral JS bug "NaN returned if value < 1e-6"
I see that this fork fixes that issue somewhat; it doesn't return NaN anymore, but the formatting of the output string has problems.
If I use format 0,0 on a number like 4.8439166267322474e-8, the formatted string looks like this:
4.8,439,166,267,322,474e-8
Note there are commas in the mantissa after the decimal point. I'd expect an output of 0 here, actually.
Format 0,0.00 returns the same string as above, where I'd expect 0.00 or 4.84e-8 or something.
I found this repo while searching for a fork that fixed the Numeral JS bug "NaN returned if value < 1e-6"
I see that this fork fixes that issue somewhat; it doesn't return
NaNanymore, but the formatting of the output string has problems.If I use format
0,0on a number like4.8439166267322474e-8, the formatted string looks like this:Note there are commas in the mantissa after the decimal point. I'd expect an output of
0here, actually.Format
0,0.00returns the same string as above, where I'd expect0.00or4.84e-8or something.Here's a codepen that shows the strangeness:
https://codepen.io/foundryspatial-duncan/pen/YzqWxgK