iso4217

iso4217 currency codes table and helpers

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
iso4217
200.2.07 years ago7 years agoMinified + gzip package size for iso4217 in KB

Readme

iso4217 Build Status
iso4217 currency codes table and helpers
usage
import currencies, { utils } from 'iso4217';

/** 
 * @example 840 => ({
  "Location": "UNITED STATES",
  "Currency": "US Dollar",
  "Code": "USD",
  "Num": "840",
  "CCC": "",
  "Obsolete": "",
  "Symbol": "$",
  "Fraction": 2
}) */
const foo = currencyNum => currencies[currencyNum];

/**
 * @example 'RUB' => ({
    "Location": "RUSSIAN FEDERATION",
    "Currency": "Russian Ruble",
    "Code": "RUB",
    "Num": "643",
    "CCC": "",
    "Obsolete": "RUR",
    "TextSymbol": "руб.",
    "Symbol": "₽",
    "Fraction": 2
}) */
const bar = currencyCode => utils.getByCode(currencyCode);