@turf/distance
Advanced tools
Comparing version 7.0.0 to 7.1.0-alpha.7
@@ -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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13931
66
1
1