Lookup the currency symbol for a given currency code.
Name says it all, this is tiny module that's helps one to get the symbol for a given currency or get the currency got given a symbol.
Get it: npm install --save currency-symbol-map
Sample usage:
1
2
3
| var getSymbolFromCurrency = require('currency-symbol-map').getSymbolFromCurrency;
getSymbolFromCurrency('USD'); //=> '$'
getSymbolFromCurrency('NOT A VALID CODE'); //=> undefined
|
1
2
3
| var getCurrencyFromSymbol = require('currency-symbol-map').getCurrencyFromSymbol;
getCurrencyFromSymbol('$'); //=> 'USD'
getCurrencyFromSymbol('NOT A VALID CODE'); //=> undefined
|
GIF FTW:
