Need private packages and team management tools?Check out npm Teams »

iso-currencies

1.1.0 • Public • Published

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

Install

npm i iso-currencies

DownloadsWeekly Downloads

358

Version

1.1.0

License

none

Last publish

Collaborators

  • avatar