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

zipcode-city-distance

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zipcode-city-distance

Simple zipcode/city distance calculator and all information you need about cities and zipcodes, including coordinates, states etc.

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
559
increased by7.71%
Maintainers
1
Weekly downloads
 
Created
Source

zipcode-city-distance

Simple, zipcode/city distance calculator and all information you need about cities and zipcodes, including coordinates, states etc.

npm install zipcode-city-distance

require zicode-city-distance module

how to calculate distance between zipcodes

let zipCodeDistance = zipCodeData.zipCodeDistance('98006', '33014');
console.log(zipCodeDistance);

how to calculate distance between cities

without state parameters:

let cityDistance = zzipCodeData.cityDistance('miami lakes', 'miami');
console.log(cityDistance);

with unit and state parameters

let cityDistance = zipCodeData.cityDistance('miami', 'bellevue', 'M', 'FL', 'WA');
console.log(cityDistance);

how to get zipcode info including cities within that zipcode

let zipInfo = zipCodeData.getInfo('zipcode', '98006')
console.log(zipInfo);

how to get the city info, including zipcodes where city is located (some cities cover more than one zipcode) and if there are cities with the same name in different states.

let cityInfo = zipCodeData.getInfo('city', 'lakemont')
console.log(cityInfo);

todo:

  • get the distance between two cities as per their lat and lon and not by their zipcode
  • add radius functionality for zipcodes or cities to show zipcodes or cities within certain radius.
  • add international functionality
  • add a bug tracker
  • add data links.

Keywords

FAQs

Package last updated on 26 Aug 2020

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