@turf/point-on-line
Advanced tools
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)<[LineString](http://geojson.org/geojson-spec.html#linestring)>** line to snap to | ||
- `point` **[Feature](http://geojson.org/geojson-spec.html#feature-objects)<[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)<[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 @@ |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a 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
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
10526
0
77
170
1
1