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

Package Sidebar

Install

npm i iso-currencies

Weekly Downloads

1,077

Version

1.1.0

License

none

Last publish

Collaborators

  • julien-rodrigues-cko
  • gee-m
  • seb-preston-cko