js-code-currency-converter
v1.17.0
Published
npm package to currency converter
Downloads
45
Maintainers
Readme
Getting started 🚀
Installation You can install the package via npm:
npm install js-code-currency-converter
NPM & Nodejs Latest Version
If your Node.js version is old, consider updating it to a newer one.
ES6 module
Utilize "type": "module" within the package.json file
Usage 💯
import {convertCurrency,setApiKey} from "js-code-currency-converter";
const fromCurrency = 'USD';
const toCurrency = 'INR';
const units = 2;
//If you have an API key then call these function
setApiKey("YOUR_SECRET_KEY"); //Set up the initial API key || Optional
// Call the convertCurrency function with dynamic values
convertCurrency(fromCurrency, toCurrency, units).then(res => {
console.log(res);
}).catch(err => {
console.error("An error occurred:", err);
});
Set Up key
Go to this link to get your own Personal API Key: Move
Signup with a Google account then you get your personal API key
Description
Upgrade your JavaScript projects easily with the js-code-currency-converter npm package. No more difficult math – this tool makes handling different currencies in your apps simple. It works with Nodejs and frameworks like Reactjs and Angular. Just install it and enjoy smooth currency conversion. Say goodbye to manual work and hello to smooth development. Get started today!
License
This project is licensed under the Apache LICENSE-2.0 © Hitesh Sharma