# zippo

> ZIP code validation and parsing

Latest version **1.0.1** (published 2015-08-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install zippo
pnpm add zippo
yarn add zippo
bun add zippo
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2015-08-01 |
| First published | 2015-07-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Ben Drucker |
| Maintainers | bendrucker |
| Keywords | zip, code, postal, us |

## Links

- npm: https://www.npmjs.com/package/zippo
- Repository: https://github.com/bendrucker/zippo
- Homepage: https://github.com/bendrucker/zippo#readme
- Issues: https://github.com/bendrucker/zippo/issues
- npm.io page: https://npm.io/package/zippo

## Alternatives

- [flatbuffers](https://npm.io/package/flatbuffers.md) — 6.0M weekly downloads
- [@exodus/patch-broken-hermes-typed-arrays](https://npm.io/package/@exodus/patch-broken-hermes-typed-arrays.md) — 28.5K weekly downloads
- [@native-to-anchor/buffer-layout](https://npm.io/package/@native-to-anchor/buffer-layout.md) — 12.2K weekly downloads
- [binary-parser-encoder](https://npm.io/package/binary-parser-encoder.md) — 5.3K weekly downloads
- [datasets-fi-postalcodes](https://npm.io/package/datasets-fi-postalcodes.md) — 1.1K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2015-08-01
- 1.0.0 — 2015-07-29

## README

# zippo [![Build Status](https://travis-ci.org/bendrucker/zippo.svg?branch=master)](https://travis-ci.org/bendrucker/zippo)

> ZIP code validation and parsing


## Install

```
$ npm install --save zippo
```


## Usage

```js
var zip = require('zippo')

zip.parse('94105abc123')
//=> 94105

zip.validate('94105abc123')
//=> false
```

## API

#### `zip.parse(input)` -> `string`

Parses a zip code input by removing non-digit characters and limiting the string to 5 characters.

##### input

*Required*  
Type: `string`

#### `zip.validate(input)` -> `boolean`

Validates whether a zip code is 5 digits.

##### input

*Required*  
Type: `string`

## License

MIT © [Ben Drucker](http://bendrucker.me)

---
_Source: https://npm.io/package/zippo · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
