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

zip-to-timezone

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zip-to-timezone

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

  • 1.1.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.6K
increased by4.3%
Maintainers
1
Weekly downloads
 
Created
Source

zipToTz

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

Installation

  npm install --save zip-to-timezone

Import

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

Usage

  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

npm install && npm test

publish

npm run publish

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

Keywords

FAQs

Package last updated on 11 Feb 2021

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