global-countries

2.1.2 • Public • Published

global-countries-node-sdk

Nodejs sdk for getting all countries, their call codes, Alpha-2 code/ Alpha-3 code and flags.

 npm i global-countries
// Require the library
const globalCountries = require('global-countries')
// Get capital
const country  = "IRAQ"
const iraqCapital = globalCountries.getCountryCapital(country)
console.log("Capital of IRAQ is", iraqCapital.toUpperCase())
// Get flag
const country  = "IRAQ"
const iraqFlag = globalCountries.getCountryFlag(country)
// get call code
const country  = "IRAQ"
const iraqCallCode = globalCountries.getCountryCallCode(country)

Readme

Keywords

none

Package Sidebar

Install

npm i global-countries

Weekly Downloads

0

Version

2.1.2

License

ISC

Unpacked Size

327 kB

Total Files

15

Last publish

Collaborators

  • goodyezeh