New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

currency-codes-ru-en-names

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

currency-codes-ru-en-names

Small library for getting currency names by currency code(s). Names available on Russian and English. 184 currency codes in total.

  • 1.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-92.86%
Maintainers
1
Weekly downloads
 
Created
Source

Description

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.

Installation

npm install currency-codes-ru-en-names

or

yarn add currency-codes-ru-en-names

Documentation

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)"

Tests

npm run test

Todo

  • 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

Keywords

FAQs

Package last updated on 19 May 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc