Socket
Socket
Sign inDemoInstall

@turf/distance

Package Overview
Dependencies
Maintainers
4
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 4.1.0 to 4.2.0

15

index.js

@@ -34,14 +34,9 @@ var getCoord = require('@turf/invariant').getCoord;

* };
* var units = "miles";
*
* var points = {
* "type": "FeatureCollection",
* "features": [from, to]
* };
* var distance = turf.distance(from, to, "miles");
*
* //=points
*
* var distance = turf.distance(from, to, units);
*
* //=distance
* //addToMap
* from.properties.distance = distance;
* to.properties.distance = distance;
* var addToMap = [from, to];
*/

@@ -48,0 +43,0 @@ module.exports = function (from, to, units) {

{
"name": "@turf/distance",
"version": "4.1.0",
"version": "4.2.0",
"description": "turf distance module",

@@ -36,4 +36,4 @@ "main": "index.js",

"dependencies": {
"@turf/helpers": "^4.1.0",
"@turf/invariant": "^4.1.0",
"@turf/helpers": "^4.2.0",
"@turf/invariant": "^4.2.0",
"load-json-file": "^2.0.0",

@@ -40,0 +40,0 @@ "write-json-file": "^2.0.0"

@@ -35,14 +35,9 @@ # @turf/distance

};
var units = "miles";
var points = {
"type": "FeatureCollection",
"features": [from, to]
};
var distance = turf.distance(from, to, "miles");
//=points
var distance = turf.distance(from, to, units);
//=distance
//addToMap
from.properties.distance = distance;
to.properties.distance = distance;
var addToMap = [from, to];
```

@@ -49,0 +44,0 @@

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