npm.io
1.0.2 • Published 7 years ago

konvert

Licence
MIT
Version
1.0.2
Deps
1
Size
4 kB
Vulns
0
Weekly
0

Konvert

NPM   npm

Konvert is a node module for fetching latest currency conversion. It can also get which countries the user can spend the target-currency.

Installation

npm i konvert

or

yarn add konvert

Usage

Require konvert module.

const {konvert, konvertCountries} = require('konvert');



Getting the current currency conversion.

// convert 20 pounds to Philippine peso

konvert('GBP', 'PHP', 20)

   .then(amount => console.log(amount));



Getting all supported countries for the target-currency

// get all countries that support pounds

konvertCountries('GBP')

   .then(countries => console.log(countries));

Keywords