1.0.1 • Published 5 years ago

exchangify v1.0.1

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

Exchangify

Simple, 100% free and tiny JavaScript library for realtime currency conversion and exchange rate calculation, from any currency, to any currency.

exchangify is integrated with Croatian National Bank API.

NOTE: The exchange rate is in HRK

Install

npm i exchangify

Example

import { exchange } from "exchangify"

// convert EUR to HRK
const convertedAmount: number = await exchange(10, "EUR", "HRK")

// convert EUR to HRK with fixedRate
const convertedAmount: number = await exchange(amount, "HRK", "EUR", 7)

Functions

exchange(amount: number, from: string, to: string, fixedRate?: number): Promise<number>

amount: amount to convert from: currency ISO 4217 standard to: currency ISO 4217 standard fixedRate?: used if you want to use fixed rate, leave empty instead returns: converted amount

rates(): Promise<ExchangeRate[]>

returns: ExchangeRate[]

see ExchangeRate

rate(from: string, to:string): Promise<number>

from: currency ISO 4217 standard to: currency ISO 4217 standard returns: exchange rate for 'from' and 'to'

Dependencies

None.

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Authors

License

This project is licensed under the MIT License - see the LICENSE.md file for details

1.0.1

5 years ago

1.0.0

5 years ago

0.9.8

5 years ago

0.9.7

5 years ago

0.9.4

5 years ago

0.9.3

5 years ago

0.9.5

5 years ago

0.9.0

5 years ago

0.9.2

5 years ago

0.9.1

5 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.8

7 years ago

0.1.7

7 years ago

0.1.6

7 years ago

0.1.5

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago