ISO-4217 Currencies
Simply a list of ISO-4217 currencies with name, code, symbol, & decimal rounding. Also, support for figuring out the currency based on ISO-3166-1 Alpha-2 country code.
Basic Usage
const lib = require('@blossomfinance/iso-4217-currencies');
const usd = lib.currency('USD');
const eur = lib.currency('FR');
const code = lib.codeForCountry('CM');
Exported API
const lib = require('@blossomfinance/iso-4217-currencies');
const {
codes,
currencies,
map,
CurrencyNotFoundError,
CountryCurrencyNotFoundError,
} = lib;
Why?
Most solutions available are super overkill, not distributed as packages (e.g. gist), and/or out of date.
Credits
Original inspiration was from Kent Safranski in the form of this helpful Gist