# zip-to-timezone

> This package provides an updated list of US zipcodes from trusted source (2020).

Latest version **1.2.1** (published 2024-04-05) · ISC license · 0 weekly downloads

## Install

```sh
npm install zip-to-timezone
pnpm add zip-to-timezone
yarn add zip-to-timezone
bun add zip-to-timezone
```

## Health

**Score 35/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.2.1 |
| Published | 2024-04-05 |
| First published | 2020-07-30 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 1.6 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Pedro Monier |
| Maintainers | pmmonier |
| Keywords | zipcode, timezone, US timezone |

## Links

- npm: https://www.npmjs.com/package/zip-to-timezone
- Repository: https://github.com/pmmonier/zipToTz
- Homepage: https://github.com/pmmonier/zipToTz#readme
- Issues: https://github.com/pmmonier/zipToTz/issues
- npm.io page: https://npm.io/package/zip-to-timezone

## Dependencies (1)

- [js-yaml](https://npm.io/package/js-yaml.md) ^3.14.1

## Alternatives

- [@js-joda/timezone](https://npm.io/package/@js-joda/timezone.md) — 383.4K weekly downloads
- [chartjs-adapter-moment](https://npm.io/package/chartjs-adapter-moment.md) — 210.8K weekly downloads
- [strftime](https://npm.io/package/strftime.md) — 171.2K weekly downloads
- [vue-flatpickr-component](https://npm.io/package/vue-flatpickr-component.md) — 115.8K weekly downloads
- [timepicker](https://npm.io/package/timepicker.md) — 51.0K weekly downloads

## Recent versions

- 1.2.1 (latest) — 2024-04-05
- 1.1.5 — 2021-02-11
- 1.1.4 — 2020-11-06
- 1.1.3 — 2020-09-24
- 1.1.2 — 2020-09-21
- 1.0.36 — 2020-09-19
- 1.0.35 — 2020-08-06
- 1.0.34 — 2020-07-31
- 1.0.33 — 2020-07-31
- 1.0.32 — 2020-07-31
- 1.0.31 — 2020-07-31
- 1.0.30 — 2020-07-31
- 1.0.29 — 2020-07-31
- 1.0.28 — 2020-07-31
- 1.0.27 — 2020-07-31
- … 27 more at https://npm.io/package/zip-to-timezone/versions

## README

# zipToTz

This package provides an updated list of US zipcodes from trusted source (2020).

## Installation 

```bash
  npm install --save zip-to-timezone
```

## Import

```javascript
  const { ZipToTz } = require('zip-to-timezone');
  // OR
  import { ZipToTz } from 'zip-to-timezone';
```

## Usage

```javascript
  try {
    const tz = new ZipToTz().full('33487'); // America/New_York
    const tz = new ZipToTz().short('33487'); // EDT 
  } catch(error) {
    // handler error  
  }
```

## Error Messages

- Incorrect input

If the input is non-number as string or the length is not 5

- Not found

If the provided zip does not have any mapping.

## build and test

```bash
npm install && npm test
```

## publish

```bash
npm run publish
```

> Note: Do not forget to update the version using `npm version` command!

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