indian-pincodes
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

Indian Pincodes

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.

Features

  • 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

Installation

Install the package using npm:

npm install indian-pincodes

Usage

Import the Package

const pincodes = require('indian-pincodes');

Get Details of a Specific Pincode

const details = pincodes.getPincodeDetails(481335);
console.log(details);

Get All Pincodes in a District

const districtPincodes = pincodes.getPincodesByDistrict('Balaghat');
console.log(districtPincodes);

Get All Pincodes in a State

const statePincodes = pincodes.getPincodesByState('Madhya Pradesh');
console.log(statePincodes);

List All Districts in a State

const districts = pincodes.getDistrictsByState('Madhya Pradesh');
console.log(districts);

List All States

const states = pincodes.getStates();
console.log(states);

Search Pincodes by Name, District, or State

const searchResults = pincodes.searchPincodes('Bhopal');
console.log(searchResults);

Export the Entire List of Pincodes

const allPincodes = pincodes.getAllPincodes();
console.log(allPincodes);

Contributing

Contributions are welcome! Please open an issue or submit a pull request on GitHub.

License

This project is licensed under the MIT License.

Package Sidebar

Install

npm i indian-pincodes

Weekly Downloads

17

Version

1.1.0

License

MIT

Unpacked Size

34 MB

Total Files

6

Last publish

Collaborators

  • priynshuchouhn