webnexs-country-code

2.0.3 • Public • Published

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"
 }

Package Sidebar

Install

npm i webnexs-country-code

Weekly Downloads

26

Version

2.0.3

License

ISC

Unpacked Size

57.5 kB

Total Files

4

Last publish

Collaborators

  • anbuwebnexs