osrec / currencyFormatter.js

A super simple currency formatting library
MIT License
633 stars 61 forks source link

Setting hidden symbol when format currency #30

Closed tuanluu-agilityio closed 6 years ago

tuanluu-agilityio commented 6 years ago

In some cases user don't want show symbol base on currency but I can't found anything setting for that. I saw you get default value on defaultSymbol if user don't setting symbol on here

https://github.com/osrec/currencyFormatter.js/blob/66fae5e9c68d390cad21c9aff3eb72fe1c26fe00/currencyFormatter.js#L1072

osrec commented 6 years ago

Fixed in version 2.2.0. You can now do either of the following to remove the symbol

OSREC.CurrencyFormatter.format(123456, { currency: 'USD', symbol: '' }) 

or

OSREC.CurrencyFormatter.format(123456, { currency: 'USD', symbol: null })