country-info
v0.1.0
Published
Gets country information such as dial number, 2 letters ISO, 3 letters ISO, and more (in the future)
Downloads
10
Readme
Country Information
#Usage
var countryInfo = require('country-info');
countryInfo.getInfoByCountryName('palestine', function(data){
console.log(data);
});
#Result:
{ name: 'PALESTINE',
code: '970',
towLetters: 'PA',
threeLetters: 'PSE' }
#API Reference
getInfoByCountryName(countryName, callback) #countryName: palestine
getInfoByDialNumber(dialNumber, callback) #dialNumber: 970
getInfoByThreeLettersISO(threeLetters, callback) #threeLetters: PSE
getInfoByTwoLettersISO(twoLetters, callback) #twoLetters: PS