1.0.0 • Published 5 years ago

how-much v1.0.0

Weekly downloads
4
License
MIT
Repository
github
Last release
5 years ago

Deprecated

No Maintenance Intended

Use fixer-api instead.


how-much

Get the currency conversion of an exchange rate

npm version Build Status Test coverage

Install

npm install --save how-much

Usage

const howMuch = require('how-much');

howMuch('USD', 'MXN').then(rate => {
  console.log(rate);
  //=> 18.368
});

API

howMuch(from, to)

Returns a promise that resolves to a number value of the exchange rate.

from

Type: string

The ISO 4217 code used as a currency base.

to

Type: string

The ISO 4217 code of the target of the currency conversion.

Related

  • how-much-cli - Get the currency conversion of an exchange rate through the command-line

License

MIT © Alejandro Beltrán