Get countries' capitals name and reverse.
npm i --save capitals
Get a capital name :
var capitals = require('capitals');
var germany = capitals.capitalOf('Germany');
console.log(germany); // Berlin
Get a country name:
var capitals = require('capitals');
var jakarta = capitals.isCapitalOf('Jakarta');
console.log(jakarta); // Indonesia
capitalOf (parameter : string
)
Description : returns name a city.
Returns : string
isCapitalOf (parameter : string
)
Description : returns name a country.
Returns string