calling-code-data
v1.1.2
Published
An ESM importable data set containing all calling codes and their mappings to ISO 3166-1 alpha-2 country code.
Downloads
139
Readme
calling-code-data
An ESM importable data set containing all calling codes and their mappings to ISO 3166-1 alpha-2 country code.
- Some calling codes map to multiple country codes. For example,
"1": ["CA", "US"]
. - Some calling codes are unassigned. For example,
"887": ["-"]
. - Some calling codes are non-geographic. For example,
"800": ["**"]
.
Snippet
{
"1": ["CA", "US"],
"1671": ["GU"],
"1809": ["DO"],
"1829": ["DO"],
"1849": ["DO"],
"44": ["GB", "GG", "IM", "JE"],
"63": ["PH"],
"81": ["JP"],
"887": ["-"],
"800": ["**"],
"881": ["**"]
}
Import
import callingCodeData from 'calling-code-data'
How to regenerate this data set.
- Copy the outer HTML of the table found on this page: https://en.wikipedia.org/wiki/List_of_country_calling_codes
- Paste the HTML into
source.html
. npm run build
.