webnexs-country-code
v2.0.7
Published
Package for country code Selection
Downloads
355
Maintainers
Readme
Webnexs Country Code
A node.js module to Get the countries data.
Installation
$ npm install webnexs-country-code
Usage
const getcode = require('webnexs-country-code')
// search by FIPS
getcode.byfips('IN')
// search by ISO
getcode.byiso('IN')
getcode.byiso('IND')
getcode.byiso('356')
// search by Phone Code
getcode.byphone_code('91')
// search by country name
getcode.bycountry('India')
// search by continent
getcode.bycontinent('Asia')
// search by Time Zone
getcode.bytime_zone('Asia/Kolkata')
// search by currency
getcode.bycurrency('Rupee')
// get an array of all countries
getcode.countries
Searching for a country code will return either null, or a country object:
{
"country": "India",
"iso2": "IN",
"iso3": "IND",
"fips": "IN",
"iso_num": 356,
"phone_code": "91",
"continent": "Asia",
"time_zone": "Asia/Kolkata",
"currency": "Rupee"
}