reactjs-currency-converter
v1.0.1
Published
react currency converter
Downloads
5
Readme
REACTJS CURRENCY CONVERTER
Authors
Installation
Install my-project with npm
npm install my-project
cd my-project
npm i reactjs-currency-converter
Code for all currency
AED - United Arab Emirates Dirham
AFN - Afghan Afghani
ALL - Albanian Lek
AMD - Armenian Dram
ANG - Netherlands Antillean Guilder
AOA - Angolan Kwanza
ARS - Argentine Peso
AUD - Australian Dollar
AWG - Aruban Florin
AZN - Azerbaijani Manat
BAM - Bosnia-Herzegovina Convertible Mark
BBD - Barbadian Dollar
BDT - Bangladeshi Taka
BGN - Bulgarian Lev
BHD - Bahraini Dinar
BIF - Burundian Franc
BMD - Bermudian Dollar
BND - Brunei Dollar
BOB - Bolivian Boliviano
BRL - Brazilian Real
BSD - Bahamian Dollar
BTN - Bhutanese Ngultrum
BWP - Botswanan Pula
BYN - Belarusian Ruble
BZD - Belize Dollar
CAD - Canadian Dollar
CDF - Congolese Franc
CHF - Swiss Franc
CLP - Chilean Peso
CNY - Chinese Yuan
COP - Colombian Peso
CRC - Costa Rican Colón
CUC - Cuban Convertible Peso
CUP - Cuban Peso
CVE - Cape Verdean Escudo
CZK - Czech Koruna
DJF - Djiboutian Franc
DKK - Danish Krone
DOP - Dominican Peso
DZD - Algerian Dinar
EGP - Egyptian Pound
ERN - Eritrean Nakfa
ETB - Ethiopian Birr
EUR - Euro
FJD - Fijian Dollar
FKP - Falkland Islands Pound
FOK - Faroese Króna
GBP - British Pound Sterling
GEL - Georgian Lari
GGP - Guernsey Pound
GHS - Ghanaian Cedi
GIP - Gibraltar Pound
GMD - Gambian Dalasi
GNF - Guinean Franc
GTQ - Guatemalan Quetzal
GYD - Guyanese Dollar
HKD - Hong Kong Dollar
HNL - Honduran Lempira
HRK - Croatian Kuna
HTG - Haitian Gourde
HUF - Hungarian Forint
IDR - Indonesian Rupiah
ILS - Israeli New Shekel
IMP - Isle of Man Pound
INR - Indian Rupee
IQD - Iraqi Dinar
IRR - Iranian Rial
ISK - Icelandic Króna
JEP - Jersey Pound
JMD - Jamaican Dollar
JOD - Jordanian Dinar
JPY - Japanese Yen
KES - Kenyan Shilling
KGS - Kyrgyzstani Som
KHR - Cambodian Riel
KID - Kiribati Dollar
KMF - Comorian Franc
KRW - South Korean Won
KWD - Kuwaiti Dinar
KYD - Cayman Islands Dollar
KZT - Kazakhstani Tenge
LAK - Lao Kip
LBP - Lebanese Pound
LKR - Sri Lankan Rupee
LRD - Liberian Dollar
LSL - Lesotho Loti
LYD - Libyan Dinar
MAD - Moroccan Dirham
MDL - Moldovan Leu
MGA - Malagasy Ariary
MKD - Macedonian Denar
MMK - Myanmar Kyat
MNT - Mongolian Tögrög
MOP - Macanese Pataca
MRU - Mauritanian Ouguiya
MUR - Mauritian Rupee
MVR - Maldivian Rufiyaa
MWK - Malawian Kwacha
MXN - Mexican Peso
MYR - Malaysian Ringgit
HOW TO USE IT
import { convertCurrency } from 'reactjs-currency-converter';
const fromCurrency = 'USD';
const toCurrency = 'EUR';
const units = 100;
convertCurrency(fromCurrency, toCurrency, units)
.then((convertedAmount) => {
console.log(`Converted Amount: ${convertedAmount} ${toCurrency}`);
})
.catch((error) => {
console.error('Error during conversion:', error);
});