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).
- Host: GitHub
- URL: https://github.com/mehcode/country-telephone-code
- Owner: mehcode
- License: mit
- Created: 2016-08-19T08:09:07.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-08-19T18:01:35.000Z (over 9 years ago)
- Last Synced: 2025-05-19T20:23:31.180Z (9 months ago)
- Language: JavaScript
- Size: 7.81 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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
```