country-telephone-code

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

Usage no npm install needed!

<script type="module">
  import countryTelephoneCode from 'https://cdn.skypack.dev/country-telephone-code';
</script>

README

Country Telephone Code

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

Install

npm i country-telephone-code --save

Usage

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

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