JSPM

haversine-dist

0.1.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q25989F
  • License MIT

Fast, minimalist library to calculate distance between two points

Package Exports

  • haversine-dist

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (haversine-dist) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Fast, minimalist library to calculate distance between two points.

Quick Start

    var haversine = require('haversine-dist');
    var dist = haversine.calculate([42.484239, -83.460072], [42.482562, -83.471546], 'feet');

Installation

Run npm install -g haversine-dist

Parameters

  1. First parameter is an array with the lat, then the long of the first point

  2. Second parameter is an array with the lat, then the long of the second point

  3. Third parameter is unitOfMeasure - feet, km, or miles. miles is the default.

Returns

The distance