nbrb-currency
1.1.0 • Public • Published 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);
});
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);
});
Readme
Keywords
nonePackage Sidebar
Install
Weekly Downloads