I made this package for working with countries data by mledoze. They are using arrays with ISO 4217
currency codes, so, using my package you can convert them to string with their names. Names available on Russian and English. Codes and named taken from Wikipedia.
npm install currency-codes-ru-en-names
or
yarn add currency-codes-ru-en-names
var currency = require('currency-codes-ru-en-names');
currency.names(code<String|Array>, [locale<String>]);
// code can be single string or flat array of 3-letter codes
// if locale not specified, then "ru" will be used
// with single string
currency.names("XCD", "ru");
// "Восточно-карибский доллар"
// with single string
currency.names("XCD", "en");
// "East Caribbean Dollar"
// with an array (single item)
currency.names(["XCD"], "ru");
// "Восточно-карибский доллар"
// with an array (multiple items)
currency.names(["USD", "USN", "USS"], "ru");
// "Доллар США, Доллар следующего дня, Доллар того же дня"
// with an array (multiple items)
currency.names(["USD", "USN", "USS"], "en");
// "US Dollar, US Dollar (Next day), US Dollar (Same day)"
npm run test
- Add npm and yarn install commands in README
- Add countries (their
ISO 639-3
codes) using this currency to every code - Add custom delimeter for output strings
- Support for input data as delimited string with choise for delimeter
- Making it work in browsers