A function to lookup the currency symbol for a given currency code.
npm install currency-symbol-map
Get symbol from currency code
const getSymbolFromCurrency =
Exposed map for other processing
const currencySymbolMap =
- the reverse lookup feature was removed (retrieving currency given a symbol) because
there is not a deterministic way to do so (i.e. the same symbol is used by multiple currencies).
- in previous versions, an unsuccessful lookup would return the
'?' character. It now returns
undefined so that it is up to you how to handle the failure.
Currency symbols originally sourced from xe, but maintained
and updated by contributors.