currency-ranker
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

Currency Ranker

Small Library to rank money in different currencies or just to get the value in different currency

Installation

npm install currency-ranker

Usage

rankCurrencies()

    import { rankCurrencies } from 'currency-ranker';

    const currenciesToRank = ['100 INR', '1.3 SGD', '0.5 EUR'];

    const res = await rankCurrencies(currenciesToRank);
    // [ '0.5 EUR', '1.3 SGD', '100 INR' ]

convertCurrency()

    import { convertCurrency } from 'currency-ranker';

    const res = await convertCurrency(1, 'USD', 'SGD');
    // 1.41434

Tests

npm run test

You can also run in watch mode while developing npm run test:watch

Contributing

  • With Github Actions in place ensure any new features pass all checks.
  • Feel free to create issues to request extra features.
  • Add unit tests for any new or changed functionality. Lint and write code accoring to enforced code quality.

Readme

Keywords

none

Package Sidebar

Install

npm i currency-ranker

Weekly Downloads

0

Version

1.0.2

License

ISC

Unpacked Size

8.16 kB

Total Files

4

Last publish

Collaborators

  • tshradheya