express-currency-converter
v1.0.2
Published
An exclusive npm package to convert currency with ease
Downloads
3
Maintainers
Readme
1. Install Node.js
Make sure you have Node.js installed. If not, download and install it from Node.js official website.
2. Initialize Your Project
If you haven't already initialized a Node.js project, run the following command in your project directory:
npm init -y
3. Initialize Your Project
Next, install the express-currency-converter package using npm:
npm install express-currency-converter
4. Import and Use the Package
You can now import and use the convertCurrency function in your project:
import { convertCurrency } from "express-currency-converter";
convertCurrency("USD", "INR", 5)
.then((res) => console.log(res))
.catch((err) => console.error(err));
Example usage:
Here's an example of how you might use the package:
import { convertCurrency } from "express-currency-converter";
async function main() {
try {
const result = await convertCurrency("USD", "INR", 5);
console.log(`5 USD is equal to ${result} INR`);
} catch (error) {
console.error("Error converting currency:", error);
}
}
main();
Contributions
Pull requests are welcome! If you find this package helpful, please consider starring the repository to show your support. You can find the git repo here: https://github.com/athithyaramaa1/express-currency-converter