A simple currency converter based on fixer.io.
This package can be installed using npm
npm install nodejs-currency-converter
Import nodejs-currency-converter
and use it as a Promise.
const convertCurrency = require('nodejs-currency-converter');
convertCurrency(1, 'USD', 'BRL').then(response => 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 YYYY-MM-DD
.
const convertCurrency = require('nodejs-currency-converter');
convertCurrency(1, 'EUR', 'BRL', '2015-08-29').then(response => response);
If any issues are found, they can be reported here.
This project is licensed under the MIT license.