1.0.2 • Published 6 years ago

nodejs-currency-converter v1.0.2

Weekly downloads
630
License
MIT
Repository
github
Last release
6 years ago

NodeJS Currency Converter

Build Status Dependencies Status DevDependencies Status

A simple currency converter based on fixer.io.

Getting started

Installation

This package can be installed using npm

npm install nodejs-currency-converter

Usage

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);

Issues

If any issues are found, they can be reported here.

License

This project is licensed under the MIT license.