Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

is-valid-us-zip

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-valid-us-zip

A small library for checking if a US 5 Digit ZIP code is real

  • 1.2.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6
increased by20%
Maintainers
1
Weekly downloads
 
Created
Source

Is Valid US ZIP

A "small" library for checking if a US 5 Digit ZIP code is real.

Install

npm install is-valid-us-zip

Usage

const isValidUSZip = require('is-valid-us-zip');

isValidUSZip("75000") // false

The function will return false for a value that is not a stirng. As you can't reference some zip codes as a number, due to the starting with a 0.

Building

Download a copy of the AREADIST_ZIP5.TXT file from USPS and pipe it into the tree builder script.

$ cat AREADIST_ZIP5.TXT | node build/make-tree.js

Data Source

  • https://postalpro.usps.com/address-quality/ais-viewer - AREADIST_ZIP5.TXT

FAQs

Package last updated on 04 Jul 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc