New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@turf/point-on-line

Package Overview
Dependencies
Maintainers
2
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@turf/point-on-line - npm Package Compare versions

Comparing version 3.3.3 to 3.5.2-alpha.d2c36ee7

10

index.js

@@ -11,4 +11,4 @@ var distance = require('@turf/distance');

* @param {Feature<LineString>} line line to snap to
* @param {Feature<Point>} point point to snap from
* @param {String} [units=miles] can be degrees, radians, miles, or kilometers
* @param {Feature<Point>} pt point to snap from
* @param {String} [units=kilometers] can be degrees, radians, miles, or kilometers
* @return {Feature<Point>} closest point on the `line` to `point`

@@ -61,6 +61,2 @@ * @example

return pointOnLine(pt, coords, units || 'miles');
};
function pointOnLine(pt, coords, units) {
var closestPt = point([Infinity, Infinity], {

@@ -112,3 +108,3 @@ dist: Infinity

return closestPt;
}
};

@@ -115,0 +111,0 @@ // modified from http://jsfiddle.net/justin_c_rounds/Gd2S2/light/

{
"name": "@turf/point-on-line",
"version": "3.3.3",
"version": "3.5.2-alpha.d2c36ee7",
"description": "",

@@ -22,13 +22,13 @@ "main": "index.js",

"tape": "^3.5.0",
"@turf/along": "^3.3.3",
"@turf/distance": "^3.3.3",
"@turf/helpers": "^3.3.3",
"@turf/line-distance": "^3.3.3"
"@turf/along": "^3.5.2-alpha.d2c36ee7",
"@turf/distance": "^3.5.2-alpha.d2c36ee7",
"@turf/helpers": "^3.5.2-alpha.d2c36ee7",
"@turf/line-distance": "^3.5.2-alpha.d2c36ee7"
},
"dependencies": {
"@turf/bearing": "^3.3.3",
"@turf/destination": "^3.3.3",
"@turf/distance": "^3.3.3",
"@turf/helpers": "^3.3.3"
"@turf/bearing": "^3.5.2-alpha.d2c36ee7",
"@turf/destination": "^3.5.2-alpha.d2c36ee7",
"@turf/distance": "^3.5.2-alpha.d2c36ee7",
"@turf/helpers": "^3.5.2-alpha.d2c36ee7"
}
}

@@ -10,4 +10,4 @@ # @turf/point-on-line

- `line` **[Feature](http://geojson.org/geojson-spec.html#feature-objects)&lt;[LineString](http://geojson.org/geojson-spec.html#linestring)>** line to snap to
- `point` **[Feature](http://geojson.org/geojson-spec.html#feature-objects)&lt;[Point](http://geojson.org/geojson-spec.html#point)>** point to snap from
- `units` **\[[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)]** can be degrees, radians, miles, or kilometers (optional, default `miles`)
- `pt` **[Feature](http://geojson.org/geojson-spec.html#feature-objects)&lt;[Point](http://geojson.org/geojson-spec.html#point)>** point to snap from
- `units` **\[[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)]** can be degrees, radians, miles, or kilometers (optional, default `kilometers`)

@@ -54,2 +54,6 @@ **Examples**

<!-- This file is automatically generated. Please don't edit it directly:
if you find an error, edit the source file (likely index.js), and re-run
./scripts/generate-readmes in the turf project. -->
---

@@ -56,0 +60,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