npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

itu-e164-country-codes

v1.0.2

Published

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

Downloads

43

Readme

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
  }
]

| Field | Type | Description | Notes | |--------------------|-----------------------|-------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | itu_country_code | number | ITU-T E.164 assigned country code | | | iso_country_code | string | null | ISO 3166-1 alpha-2 country code | Where 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. | | name | string | null | Name | Defined 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. |