capitals
v1.0.1
Published
Get countries capitals
Downloads
4
Readme
Capitals
Get countries' capitals name and reverse.
Installation
npm i --save capitals
Usage
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
Api
capitalOf (parameter : string
)
Description : returns name a city.
Returns : string
isCapitalOf (parameter : string
)
Description : return name a country.
Returns string