1.1.2 • Published 8 months ago

calling-code-data v1.1.2

Weekly downloads
-
License
MIT
Repository
-
Last release
8 months ago

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.

  1. Copy the outer HTML of the table found on this page: https://en.wikipedia.org/wiki/List_of_country_calling_codes
  2. Paste the HTML into source.html.
  3. npm run build.
1.1.2

8 months ago

1.1.1

8 months ago

1.1.0

8 months ago

1.0.2

8 months ago

1.0.1

8 months ago

1.0.0

8 months ago