Skip to content

GoodnessEzeokafor/global-countries-examples

Repository files navigation

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

About

example codes on how to use global-countries sdk

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published