Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

javascript-currency-library

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

javascript-currency-library

The goal of this javascript library is to provide some services with the currencies

  • 0.2.1
  • latest
  • Source
  • npm
  • Socket score

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

javascript-currency-library CircleCI

The goal of this library is to provide some services with the currencies. The first one is to give the relationships between currencies and countries.

The data in this repo are pretty raws (ISO codes). To have more display-friendler things, you can use some others library :

Warning : the lists are not comprehensives ie. all the currencies are not defined and all the countries of a currency neither.

Examples

    const currencyManager = require('javascript-currency-library');

    console.log(currencyManager.get('GBP').getCountries());
    // output : ['GB']

    console.log(currencyManager.get('EUR').getCountries());
    // output : ['ES','DE','FR', 'IT']

    console.log(currencyManager.findByCountry('FR');
    // output : 'EUR'

    console.log(currencyManager.get('EUR').isAvailableIn('UK'));
    // output : false

   console.log(currencyManager.getSupportedCurrencies());
   // output : ['EUR', 'GBP']

Install

npm install --save javascript-currency-library

Documentation

Look at the documentation in the code.

Contribute

Look at contribution guidelines here : CONTRIBUTING.md

Running tests locally

Simply run :

yarn install && yarn test

To automatically launch the tests when a file is changed :

yarn run watch-test

Check the style :

yarn run check-build

FAQs

Package last updated on 07 May 2018

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