Socket
Socket
Sign inDemoInstall

@bskid99/city-state-country

Package Overview
Dependencies
88
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @bskid99/city-state-country

Get cities, states, countries across the world.


Version published
Weekly downloads
2
increased by100%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Cities-States-Country

Get all Cities, State, Country all over the world.

Steps for Installation : -

Install the package with

  npm i city-state-country --save
  

Usage

  var worldMapData = require('city-state-country');

Supported Methods

Get list of all Countries

 const countriesList = worldMapData.getAllCountries();

Search Country

 const countriesList = worldMapData.searchCountry('In');

Get list of all States from a Country

 const statesList = worldMapData.getAllStatesFromCountry('India');

Get list of all States from World

 const statesList = worldMapData.getAllStates();

Search State details

 const statesList = worldMapData.searchState('Maha');
 

It will return all states from world which starts with 'Maha'.

Get list of all Cities from a State

 const citiesList = worldMapData.getAllCitiesFromState('Maharashtra');

Search City details

 const citiesList = worldMapData.searchCity('Par');

It will return all cities from world which starts with 'Maha'.

Submit Issues

Email me regarding any issue me at swapnil.nakhate1010@gmail.com

Note

This database is taken from : https://github.com/hiiamrohit/Countries-States-Cities-database .
For any database related changes in plugin please write an email.

Keywords

FAQs

Last updated on 22 Feb 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc