Closed ianstormtaylor closed 3 years ago
Hi @ianstormtaylor ,
You can use the abbreviation (a) and currency ($) together.
You can try running the following example:
format(1234, '$0,0.00a', { currency: 'USD' }); // Returns "$1.23K"
In order to format currency, you need to specify the currency in the options object (e.g. { currency: 'USD' }). I'll upload soon some detailed documentation, so I hope that helps understanding better how the library works.
Thanks for reporting anyway :)
Ah my bad I totally missed that! Works perfectly.
Thanks for this library btw, it's amazingly simple but does exactly what's needed.
It looks like there is the
a
format for abbreviated numbers (which is awesome!) but you can't usea
and$
together. I was hoping to have something like: