Socket
Socket
Sign inDemoInstall

@turf/distance

Package Overview
Dependencies
Maintainers
0
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@turf/distance - npm Package Compare versions

Comparing version 7.0.0 to 7.1.0-alpha.7

11

dist/esm/index.d.ts

@@ -1,14 +0,13 @@

import { Point } from 'geojson';
import { Coord, Units } from '@turf/helpers';
/**
* Calculates the distance between two {@link Point|points} in degrees, radians, miles, or kilometers.
* Calculates the distance between two {@link Coord|coordinates} in degrees, radians, miles, or kilometers.
* This uses the [Haversine formula](http://en.wikipedia.org/wiki/Haversine_formula) to account for global curvature.
*
* @name distance
* @param {Coord | Point} from origin point or coordinate
* @param {Coord | Point} to destination point or coordinate
* @param {Coord} from origin coordinate
* @param {Coord} to destination coordinate
* @param {Object} [options={}] Optional parameters
* @param {string} [options.units='kilometers'] can be degrees, radians, miles, or kilometers
* @returns {number} distance between the two points
* @returns {number} distance between the two coordinates
* @example

@@ -26,3 +25,3 @@ * var from = turf.point([-75.343, 39.984]);

*/
declare function distance(from: Coord | Point, to: Coord | Point, options?: {
declare function distance(from: Coord, to: Coord, options?: {
units?: Units;

@@ -29,0 +28,0 @@ }): number;

@@ -1,4 +0,1 @@

var __defProp = Object.defineProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
// index.ts

@@ -20,3 +17,2 @@ import { getCoord } from "@turf/invariant";

}
__name(distance, "distance");
var turf_distance_default = distance;

@@ -23,0 +19,0 @@ export {

{
"name": "@turf/distance",
"version": "7.0.0",
"version": "7.1.0-alpha.7+0ce6ecca0",
"description": "turf distance module",

@@ -66,7 +66,7 @@ "author": "Turf Authors",

"dependencies": {
"@turf/helpers": "^7.0.0",
"@turf/invariant": "^7.0.0",
"@turf/helpers": "^7.1.0-alpha.7+0ce6ecca0",
"@turf/invariant": "^7.1.0-alpha.7+0ce6ecca0",
"tslib": "^2.6.2"
},
"gitHead": "3d3a7917025fbabe191dbddbc89754b86f9c7739"
"gitHead": "0ce6ecca05829690270fec6d6bed2003495fe0ea"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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