phonecode
v1.0.0
Published
Get countries phone code
Downloads
2
Readme
PhoneCode
Get countries' phone code or do reverse.
Installation
npm i --save phonecode
Usage
Get phone code of a country :
var phonecode = require('phonecode');
var one = phonecode.codeOf('Italy');
console.log(one); // 39
Recognize a number is which country's phone code:
var phonecode = require('phonecode');
var one = phonecode.isCodeOf(91);
console.log(one); // India
Api
codeOf (parameter : string
)
Description : returns phone code of a country.
Returns : number
isCodeOf (parameter : number
)
Description : returns name of a country which has the phone code.
Returns : string