zipcode-data

1.0.0 • Public • Published

ZipCodeData

Get data on any US zipcode, including the state, city, and the use of daylight savings time.

Installation

$ npm install zipcode-data

Then to use ZipCodeData:

const ZipCodeData = require('zipcode-data');

Usage

You can pass in the zipcode as an integer (number) or a string.

Zipcode to state lookup

var state = ZipCodeData.stateFromZip(60201);

Zipcode to city lookup

var city = ZipCodeData.cityFromZip(60201);

Does this zipcode use daylight savings time?

// let's find out! (this method returns a boolean)
var usesDST = ZipCodeData.dstFromZip(60201);

What if I want all this data at once?

var zipCodeData = ZipCodeData.lookupZip(60201);

Is this zipcode in the USA?

// let's find out! (this method returns a boolean)
var isUSA = ZipCodeData.isUSA(60201);

License

Do whatever you want with this. If this package saved you time, money, or effort, please consider adding somewhere Thanks to Will Brickner for ZipCodeData. I worked hard on it and gave it to you for free <3.

Package Sidebar

Install

npm i zipcode-data

Weekly Downloads

211

Version

1.0.0

License

ISC

Last publish

Collaborators

  • wbrickner