surajit-currency-converter
v2.0.0
Published
A currency converter npm package
Downloads
5
Readme
surajit-currency-converter
Description
This package is a Currency Converter. It’s a simple and efficient tool that allows you to convert between different currencies. The package takes two input fields: the current currency and the currency to which you want to convert. It then returns the converted value based on the latest exchange rates.
Installation
First, install the package using npm:
npm i surajit-currency-converter
Sample Usages -
import { convertCurrency } from "surajit-currency-converter";
convertCurrency("INR", "EUR", 3)
.then((res) => {
console.log(res);
});
In this example, we’re converting 3 units of currency from Indian Rupees (INR) to Euros(EUR). The convertCurrency function returns a Promise, and the converted value is logged to the console once the Promise resolves.