nbrb-currency
v1.1.0
Published
Get currency list from website of national belarussian bank in json
Downloads
47
Readme
nbrb-currency
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
});