This package is perhaps the most comprehensive list of country codes. It includes information from ISO, from UN and other agencies.
The list of information included is extensive. The following are included:
- ISO Codes: the ISO code for each country as defined in ISO 3166-1
- FIFA country code provided by the [Fédération internationale de football association]
- Dial prefix and country code assigned by International Telecommunication Union (ITU)
- MARC Code as defined by International Federation of Library Associations and Institutions (IFLA)
- GAUL code, acronym of Global Administrative Unit Layers, defined by Food and Agriculture Organization of the United Nations (FAO)
- FIPS code as defined by Federal Information Processing Standards (FIPS)
- WMO code as defined by World Meteorological Organization (WMO)
- IOC code assigned by International Olympic Committee (IOC)
- M49 code or Standard Country or Area Codes for Statistical Use (Series M, No. 49) defined by the United Nations
- UNTERM country names assigned by United Nations Multilingual Terminology Database. UNTERM country names are provided in one of the six official United Nations languages (Arabic, Chinese, English, French, Russian and Spanish) and have both a short and format name
- Geoscheme codes defined by the United Nations Organization. These include the definition of region, subregions and intermediate regions
- Currency codes that matches the official currency in a given country. These are sourced by the ISO 4217-1 standard. They include the name, alphanumeric and numeric code, minor units and country name
- Additional statistical information provided by the United Nations as if the country is a considered as developed country, small island, landlocked, etc.
- Capital name of the country
- Geoname identifier for a country provided by GeoNames geographical database
- Top-level domain of the country
- CLDR country name as defined in the Unicode Common Locale Data Repository (CLDR)
- Languages adopted in the country, defined either in a local format, e.g.
en-US
or ISO 639 format, eg.zh
orhak
- EDGAR country code maintained by the Securities and Exchange Commission
The package can be imported as entire database
import countries from '@lunaticmuch/country-codes'
It also offers few helps which can be imported as
import {countryByISO} from '@lunaticmuch/country-codes'
Return a country given an ISO code. The code can be either a 2-byte alphanumeric code, or a 3-byte alphanumeric or numeric code.
If no code is provided, the function returns undefined
Given the large amount of in this database and the different sources, not always aligned and harmonized, the data provided in this library cannot be considered to have the highest quality and standard that it should have.
Everybody is welcome to contribute to this library. Any pull request will be welcome.