get-currency-by-country
v1.1.1
Published
Country to Currency is a npm package that provides a simple and efficient way to map country names to their respective currency codes. It includes a comprehensive list of countries, each mapped to its currency code and country abbreviation. This package i
Downloads
6
Readme
Country to Currency
This is a simple Node.js package that provides a mapping from country names to their respective currencies.
Installation
You can install this package using npm:
npm install country-to-currency
Usage First, import the package:
const countryToCurrency = require('country-to-currency');
Then, you can use the getCurrency function to get the currency of a country:
const currency = countryToCurrency.getCurrency('United States');
console.log(currency); // 'USD'