GithubHelp home page GithubHelp logo

nepeinav / currency-names Goto Github PK

View Code? Open in Web Editor NEW

This project forked from alcovegan/currency-names

0.0 1.0 0.0 101 KB

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

Home Page: https://www.npmjs.com/package/currency-codes-ru-en-names

JavaScript 100.00%

currency-names's Introduction

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

currency-names's People

Contributors

alcovegan avatar nepeinav avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.