Closed c-x closed 3 years ago
Sorry to plug a different library, but d3-format handles this nicely.
any way we can reopen this? would love to have this solved in the library or maybe have docs on how to use another library to format with decimal.js
Hello,
Would it be possible to add a
toLocaleString()
function or something similar ?I have numbers such as
11783.20
which are rendered nicely with trailing zeros withtoFixed(2)
for example but the left part isn't localized. I would like to render them with spaces, or commas, such as11,783.20
or11 783.20
(without loosing the precision). In short, making them human readable :)I tried various things with the javascript toLocaleString() but it removes the trailing zeros (ex:
11783.20
becomes11 783.2
).Thanks!