Skip to content

Latest commit

 

History

History
39 lines (31 loc) · 726 Bytes

README.md

File metadata and controls

39 lines (31 loc) · 726 Bytes

examples on how to use global-countries sdk

 npm i global-countries

or

yarn add global-countries

In .js files, the following codes will help

// 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)

Contribute

Click this link to see guidelines