npm install iso-country-currency
Import package where you want and start using
Now has TS support!
v0.7.0
for
loops v0.6.0
Returns an array of all ISO codes and according data
getAllISOCodes()
{
iso: "BE"
countryName: "Belgium",
currency: "EUR",
symbol: "€",
dateFormat: "d/MM/yyyy",
numericCode: 978
}
Returns an object with properties 'countryName', 'currency', 'symbol' and 'dateFormat'
getAllInfoByISO('BE')
{
iso: "BE"
countryName: "Belgium",
currency: "EUR",
symbol: "€",
dateFormat: "d/MM/yyyy",
numericCode: 978
}
Returns param value for given ISO2
getParamByISO('BE', 'symbol')
€
Returns ISO2 code by given param value
getISOByParam('countryName', 'Belgium')
BE
Returns search param value by given param value
getParamByParam('countryName', 'Belgium', 'currency')
EUR
Returns array with all countries, that contain given param ('currency', 'symbol') with given value
getAllCountriesByCurrencyOrSymbol('currency', 'EUR')
["Belgium", "Saint Barthelemy", "Reunion", "Greece", ...]
Returns array with all ISO2 codes, that contain given param ('currency', 'symbol') with given value
getAllISOByCurrencyOrSymbol('currency', 'EUR')
["BE", "BL", "RE", "GR", ...]