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
Support for string unlocks formatting high-precision values that would lose precision if converted to number. Also, string argument is well-supported across browsers.
I know we want to stay in compliance with the spec so looking at the relevant parts (e.g. format):
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Intl.NumberFormat.format*()
supports value argument as number, bigint or string. Corresponding methods inintl-numberformat
and its consumers, only support number.Support for string unlocks formatting high-precision values that would lose precision if converted to
number
. Also, string argument is well-supported across browsers.I know we want to stay in compliance with the spec so looking at the relevant parts (e.g.
format
):and "ToNumber" does prescribe handling for string:
Which implies that "value" can be string.
Should this be supported in this library? I am not sure if this lack of support is intentional or not. If not, please convert this to an issue.
Beta Was this translation helpful? Give feedback.
All reactions