shout out to He1senberg31415!
accepts alpha2-code (2 letters) as a string - Capitalization does not matter
accepts alpha3-code (3 letters) as a string - Capitalization does not matter as well
accepts UN-code (3 numbers) as a string or as an integer
functions accepts strings of any form, don't worry about capitalization like "United States" or "united states", "United states", "united States", ...
import { findCountryFromAlpha2 } from 'coodes-country-codes'
const country = findCountryFromAlpha2("US") // country = "United States of America"
- every function returns a country by its english name if it exists in the international country codes
- if a country is not included in the international country codes, then every function returns undefined