1.0.3 • Published 12 months ago

indian-pincode-search v1.0.3

Weekly downloads
-
License
ISC
Repository
-
Last release
12 months ago

About this package

Details of Post Office by searching Postal PIN Code or Post Office Branch Name of India.

Installation

Use the package to install into your project 😎

npm i indian-pincode-search

Usage

import { getNamesbyPincode, getPincodeByName } from "indian-pincode-search";

(async () => {
  console.log(await getNamesbyPincode(760008));
})();

#returns
[
  {
    name: 'Industrial Estates',
    district: 'Ganjam',
    state: 'Odisha',
    country: 'India'
  },
  {
    name: 'Lanjipalli',
    district: 'Ganjam',
    state: 'Odisha',
    country: 'India'
  }
]

#Error handling
(async () => {
  console.log(await getNamesbyPincode(760005558));
})();

#returns
No records found


(async () => {
  console.log(await getPincodeByName("lanjipalli"));
})();

# returns
[
  {
    pincode: '760008',
    district: 'Ganjam',
    state: 'Odisha',
    country: 'India'
  }
]

#Error handling
(async () => {
  console.log(await getPincodeByName("jsksjshsjnsnhj"));
})();

#returns
No records found

🔗 Connect

github

portfolio

linkedin

twitter

1.0.3

12 months ago

1.0.2

12 months ago

1.0.1

12 months ago

1.0.0

12 months ago