india-state-district
v1.0.2
Published
New Indian State and District Picker. This plugin will provide the functionality of choosing state and their respective districts from the dropdown.
Downloads
510
Readme
India State and District
This npm package provides functions to get the list of Indian states and districts.
Features
- getIndiaState(): Returns an array of objects representing Indian states with their names and codes.
- getIndiaDistrict(stateCode): Returns an array of districts for the specified state code.
Installation
npm install india-state-district
Usage
const { getIndiaState, getIndiaDistrict } = require("india-state-district")
// Get the list of Indian states
const states = getIndiaState()
console.log("Indian States:", states)
// Get the districts of a specific state (default is Andhra Pradesh)
const districts = getIndiaDistrict("UK")
console.log("Districts of Uttarakhand:", districts)