An open API service indexing awesome lists of open source software.

https://github.com/mehcode/country-telephone-code

Simple getter for telephone codes for all countries (backed by a script that dumps data direct from the CLDR).
https://github.com/mehcode/country-telephone-code

Last synced: 8 months ago
JSON representation

Simple getter for telephone codes for all countries (backed by a script that dumps data direct from the CLDR).

Awesome Lists containing this project

README

          

# Country Telephone Code
> Simple getter for telephone codes for all countries (backed by a script that dumps data direct from the CLDR).

## Install

```bash
npm i country-telephone-code --save
```

## Usage

```js
import countryTelephoneCode, {countries} from "country-telephone-code";

// countryTelephoneCode( 2-LETTER COUNTRY CODE )
countryTelephoneCode("US"); // 1
countryTelephoneCode("JA"); // 81
countryTelephoneCode("ZW"); // 263
```