a javascript module to list and work on currency codes based on the ISO 4217 standard.
const { getISOCode, getFractionDigit } = require('currency-iso');
console.log(getISOCode('EUR')); // 978
console.log(getFractionDigit('EUR')); // 2
console.log(getFractionDigit('Nothing')); // undefined
console.log(getHtmlCode('EUR')); //€
Expects a currency code.
Returns the ISO Code for that currency code.
If not found, it returns undefined
.
Expects a currency code.
Returns the html code for that currency code.
If not found, it returns undefined
.
Expects a currency code.
Returns the Fraction Digit for that currency code.
If not found, it returns undefined
.
Expects a currency code.
Returns the Currency Name for that currency code.
If not found, it returns undefined
.
Expects a currency code.
Returns an array of Countries using the currency code.
If not found, it returns undefined
.
Expects a currency code.
Returns the information for that currency code.
If not found, it returns undefined
.
Returns an array of all currency codes.
npm install currency-iso
MIT