@veriown/country-state-region
v0.2.2
Published
Country, state and region data
Downloads
6
Keywords
Readme
Installation
npm install --save @veriown/country-state-region
Usage
- Import the functions.
const { getCountries, getStatesForCountry, getRegionsForState } = require('@veriown/country-state-region');
- Use wherever you want.
getCountries();
/* output format: [
{
"name": "India",
"geonameId": 1269750,
"code": "in"
},
...
] */
getStatesForCountry();
/* output format:
[
{
"name": "Andaman and Nicobar",
"geonameId": 1278647,
"code": "in:andaman-and-nicobar"
},
...
] */