This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
number formatter outputs NaN.0 for large numbers with decimals #8674
Closed
Description
http://plnkr.co/edit/bB1m5UOpLJJUIlHOYKAO?p=preview
For very large numbers when converting to a string the browser might use the "#e#" format which breaks the use of appending "e"+fractionSize
and produces NaN.
The MDN page that formatNumber
references appears to handle this by doing a .split('e')
before generating the "#e#" string: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/round