fast-convert-currency

1.0.0 • Public • Published

fast-convert-currency

All currency units, convert in the simplest way!

npm i fast-convert-currency

GitHub package.json version npm

Features:

  • The conversion of all currencies. ✅
  • Simplified module ✅
  • Quick turnaround time✅

Usage

Very easy, you don't even need to use the documentation, actually.😉

  • getExchangeRate ()
const { getExchangeRate } = require('fast-convert-currency');

getExchangeRate('USD', 'TRY'); // async

example;

(async () => {
    const rate = await getExchangeRate('USD', 'TRY');
    console.log(rate);
    /* 
    {
        amount: 29.97,
        lastUpdated: 'an hour ago'
    }
    */
})();
  • convertCurrency()
const { convertCurrency } = require('fast-convert-currency');

convertCurrency('USD', 'TRY', 100);

(async () => {
    const converted = await convertCurrency('USD', 'TRY', 100);
    /*
    {
        data: {
            amount: '2997.00',
            currency: 'TRY'
        },
        message: '100 USD is worth 2997.00 TRY.'
    }
    */
    console.log(converted);
})();

NPM

Link

Package Sidebar

Install

npm i fast-convert-currency

Weekly Downloads

12

Version

1.0.0

License

ISC

Unpacked Size

6.66 kB

Total Files

7

Last publish

Collaborators

  • kadoresmi00