Socket
Socket
Sign inDemoInstall

calling-code-data

Package Overview
Dependencies
0
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    calling-code-data

An ESM importable data set containing all calling codes and their mappings to ISO 3166-1 alpha-2 country code.


Version published
Maintainers
1
Install size
9.36 kB
Created

Readme

Source

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.

FAQs

Last updated on 08 Sep 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc