@turf/line-intersect 4.5.2 → 4.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +3 -17
  2. package/index.js +3 -17
  3. package/package.json +6 -6
package/README.md CHANGED
@@ -12,26 +12,12 @@ Takes any LineString or Polygon GeoJSON and returns the intersecting point(s).
12
12
  **Examples**
13
13
 
14
14
  ```javascript
15
- var line1 = {
16
- "type": "Feature",
17
- "properties": {},
18
- "geometry": {
19
- "type": "LineString",
20
- "coordinates": [[126, -11], [129, -21]]
21
- }
22
- };
23
- var line2 = {
24
- "type": "Feature",
25
- "properties": {},
26
- "geometry": {
27
- "type": "LineString",
28
- "coordinates": [[123, -18], [131, -14]]
29
- }
30
- };
15
+ var line1 = turf.lineString([[126, -11], [129, -21]]);
16
+ var line2 = turf.lineString([[123, -18], [131, -14]]);
31
17
  var intersects = turf.lineIntersect(line1, line2);
32
18
 
33
19
  //addToMap
34
- var addToMap = [line, line2, intersects]
20
+ var addToMap = [line1, line2, intersects]
35
21
  ```
36
22
 
37
23
  Returns **[FeatureCollection](http://geojson.org/geojson-spec.html#feature-collection-objects)<[Point](http://geojson.org/geojson-spec.html#point)>** point(s) that intersect both
package/index.js CHANGED
@@ -15,26 +15,12 @@ var featureCollection = helpers.featureCollection;
15
15
  * @param {Geometry|FeatureCollection|Feature<LineString|MultiLineString|Polygon|MultiPolygon>} line2 any LineString or Polygon
16
16
  * @returns {FeatureCollection<Point>} point(s) that intersect both
17
17
  * @example
18
- * var line1 = {
19
- * "type": "Feature",
20
- * "properties": {},
21
- * "geometry": {
22
- * "type": "LineString",
23
- * "coordinates": [[126, -11], [129, -21]]
24
- * }
25
- * };
26
- * var line2 = {
27
- * "type": "Feature",
28
- * "properties": {},
29
- * "geometry": {
30
- * "type": "LineString",
31
- * "coordinates": [[123, -18], [131, -14]]
32
- * }
33
- * };
18
+ * var line1 = turf.lineString([[126, -11], [129, -21]]);
19
+ * var line2 = turf.lineString([[123, -18], [131, -14]]);
34
20
  * var intersects = turf.lineIntersect(line1, line2);
35
21
  *
36
22
  * //addToMap
37
- * var addToMap = [line, line2, intersects]
23
+ * var addToMap = [line1, line2, intersects]
38
24
  */
39
25
  module.exports = function (line1, line2) {
40
26
  var unique = {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@turf/line-intersect",
3
- "version": "4.5.2",
3
+ "version": "4.7.3",
4
4
  "description": "turf line-intersect module",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -34,17 +34,17 @@
34
34
  },
35
35
  "homepage": "https://github.com/Turfjs/turf",
36
36
  "devDependencies": {
37
- "@turf/truncate": "^4.5.2",
37
+ "@turf/truncate": "^4.7.3",
38
38
  "benchmark": "^2.1.4",
39
39
  "load-json-file": "^2.0.0",
40
40
  "tape": "^4.6.3",
41
41
  "write-json-file": "^2.0.0"
42
42
  },
43
43
  "dependencies": {
44
- "@turf/helpers": "^4.5.2",
45
- "@turf/invariant": "^4.5.2",
46
- "@turf/line-segment": "^4.5.2",
47
- "@turf/meta": "^4.5.2",
44
+ "@turf/helpers": "^4.7.3",
45
+ "@turf/invariant": "^4.7.3",
46
+ "@turf/line-segment": "^4.7.3",
47
+ "@turf/meta": "^4.7.3",
48
48
  "geojson-rbush": "^1.0.1"
49
49
  }
50
50
  }