New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

itu-e164-country-codes

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

itu-e164-country-codes

Javascript Module for searching ITU-T E.164 Country Codes

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
decreased by-33.33%
Maintainers
1
Weekly downloads
 
Created
Source

ITU-T E.164 Country Code Lookup

npm version License: MIT CircleCI Coverage Status Known Vulnerabilities

Javascript Module for searching ITU E.164 Country Codes.

Source data:

Installation

npm install itu-e164-country-codes

Usage

fromITUCode

Search for records by ITU E.164 assigned country code.


```javascript
const { fromITUCode } = require('itu-e164-country-codes');

// Search by ITU E.164 Country Code
console.log(fromITUCode(372));
/*
[
  {
    itu_country_code: 372,
    name: 'Estonia (Republic of)',
    iso_country_code: 'EW'
  }
]
 */

NOTE: Many ITU E.164 assigned country codes represent multiple countries or regions. Each region recognised by the ITU is represented as a separate record.

fromISOCode

Search for records by ISO 3166-1 alpha-2 Country Code.

// Search by ISO 3166-1 alpha-2 Country Code
console.log(fromISOCode('AU'));
/*
[
  {
    itu_country_code: 61,
    name: 'Australia',
    iso_country_code: 'AU'
  },
  {
    itu_country_code: 672,
    name: 'Australian External Territories',
    iso_country_code: 'AU'
  }
]
 */

NOTE: Some ITU E.164 assigned country codes correspond to sub-regions of an ISO 3166-1 recognised country which is not separately recognised by the ISO. In these cases these are grouped under the primary ISO-3166-1 code. This means multiple entries may match a single ISO 3166-1 alpha-2 country code.

Data Structure

[
  {
    itu_country_code: number,
    name: string,
    iso_country_code: string
  }
]
FieldTypeDescriptionNotes
itu_country_codenumberITU-T E.164 assigned country code
iso_country_codestring | nullISO 3166-1 alpha-2 country codeWhere the ITU code represents a sub-region of a country which does not have a seperate ISO 3166-1 designation the country designation is used. If the ITU code does not correspond to a country or region of a country this will be null.
namestring | nullNameDefined as per the ITU document "List of Recommendation ITU-T E.164 assigned country codes". If the ITU-T documentation lists this ITU-T e.164 assigned country code as "Spare" this will be null.

Keywords

FAQs

Package last updated on 26 Mar 2024

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc