A parser to get country ISO codes and information from a country name or abbreviation; it will throw a ZeroDepError
on failure.
Full documentation is available at the zerodep.app page.
geoCountryIso('usa'); // 'US'
geoCountryIso('canada'); // 'CA'
geoCountryIso('great britain'); // 'GB'
geoCountry(['es']);
// {
// countryName: 'Spain',
// countryIso2: 'ES',
// countryIso3: 'ESP',
// countryCode: 724,
// }
geoCountryIso('unknown'); // thows ZeroDepError: Could not find a country for "UNKNOWN"
geoCountry('unknown'); // thows ZeroDepError: Could not find a country for "UNKNOWN"