New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

nbrb-currency

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nbrb-currency

Get currency list from website of national belarussian bank in json

latest
Source
npmnpm
Version
1.1.0
Version published
Weekly downloads
40
900%
Maintainers
1
Weekly downloads
 
Created
Source

nbrb-currency

NPM version

Returns exchange rates of the National Bank of the Republic of Belarus.

npm i -S nbrb-currency

Getting currency rates for today

var currency = require('nbrb-currency');

currency(function(err, data) {
    var rate = data.currencies.find(function (item) {
        return item.charCode === 'USD';
    }).rate;

    console.log(rate); //it will print rate for USD for current date
});

Getting currency rates for specific date

var currency = require('nbrb-currency');

currency('12/24/2014', function(err, data) {
    var rate = data.currencies.find(function (item) {
        return item.charCode === 'USD';
    }).rate;

    console.log(rate); //it will print rate for USD for date '12/24/2014': 10950
});

FAQs

Package last updated on 19 Jun 2016

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