A comprehensive NPM package to handle Indian pincodes, including details like district, state, region, and more. This package allows you to perform efficient searches and retrieve detailed information about pincodes.
- Get details of a specific pincode
- Get all pincodes in a district
- Get all pincodes in a state
- List all districts in a state
- List all states
- Search pincodes by name, district, or state
- Export the entire list of pincodes
Install the package using npm:
npm install indian-pincodes
const pincodes = require('indian-pincodes');
const details = pincodes.getPincodeDetails(481335);
console.log(details);
const districtPincodes = pincodes.getPincodesByDistrict('Balaghat');
console.log(districtPincodes);
const statePincodes = pincodes.getPincodesByState('Madhya Pradesh');
console.log(statePincodes);
const districts = pincodes.getDistrictsByState('Madhya Pradesh');
console.log(districts);
const states = pincodes.getStates();
console.log(states);
const searchResults = pincodes.searchPincodes('Bhopal');
console.log(searchResults);
const allPincodes = pincodes.getAllPincodes();
console.log(allPincodes);
Contributions are welcome! Please open an issue or submit a pull request on GitHub.
This project is licensed under the MIT License.