Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

iso-currencies

processout7.3k1.1.0

This package allows you to easily associate a currency ISO 4217 code with its attributes (places, number, countries, name, symbol)

iso4217, currency, currencies, alpha, country, 4217, iso

readme

currencies

Package for iso currencies, supports multiple languages

Installation

npm install iso-currencies --save

Usage

  var currencies = require('iso-currences')


  console.log(currencies.list()) // list of all (with their information)

  dirham = currencies.information("AED") // get information for AED
  console.log(dirham.num) // ISO number of currency
  console.log(dirham.places) // Number of decimal places for currency
  console.log(dirham.name) // Official name of currency
  console.log(dirham.countries) // Countries that use the currency
  console.log(dirham.symbol) // UTF-8 symbol (may be more then 1 character)

  console.log(currencies.isValid("aed")) // Whether the currency code is valid

Tests

npm test