A module that can add currency symbol in front of string or returns currency symbol corresponding to currency code.
npm install currency-symbol-wrap --save
var cur = require('currency-symbol-wrap');
cur.addCurrencySymbol('123', 'USD')
//Returns $123
cur.addCurrencySymbol('1234', 'EUR')
//Returns €1234
cur.getCurrencySymbol('CZK')
//Returns Kč
- addCurrencySymbol
Adds currency symbol in front of string
cur.addCurrencySymbol('123', 'USD') // $123
cur.addCurrencySymbol('1234', 'EUR') // €1234
- getCurrencySymbol
Gets currency symbol for currency code
cur.getCurrencySymbol('CZK') // Kč
cur.getCurrencySymbol('EUR') // €