1.0.1 • Published 7 years ago
cbar-currency-converter v1.0.1
Cbar Currency Converter
A simple currency converter based on cbar.az.
Getting started
Installation
This package can be installed using npm
npm install cbar-currency-converterUsage
Import cbar-currency-converter and use it as a Promise.
const cbar = require('cbar-currency-converter');
cbar({ to: "USD", "amount": 1 }).then(response => console.log(response));
// OR
cbar({ from: "USD", "amount": 1 }).then(response => console.log(response));Without the last parameter, the function will return the currency based on the current day conversion. To pass the date to convert, pass the last parameter in the format DD.MM.YYYY.
const cbar = require('cbar-currency-converter');
cbar({ to: "USD", "amount": 1, currencyDate: "25.12.2018" }).then(response => console.log(response));Issues
If any issues are found, they can be reported here.
License
This project is licensed under the MIT license.