1.0.3 • Published 2 years ago

indian-pincode-search v1.0.3

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years 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

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago