@turf/line-chunk 6.5.0 → 7.0.0-alpha.0

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.
package/README.md CHANGED
@@ -7,15 +7,16 @@
7
7
  Divides a [LineString][1] into chunks of a specified length.
8
8
  If the line is shorter than the segment length then the original line is returned.
9
9
 
10
- **Parameters**
10
+ ### Parameters
11
11
 
12
- - `geojson` **([FeatureCollection][2] \| [Geometry][3] \| [Feature][4]<([LineString][5] \| [MultiLineString][6])>)** the lines to split
13
- - `segmentLength` **[number][7]** how long to make each segment
14
- - `options` **[Object][8]** Optional parameters (optional, default `{}`)
15
- - `options.units` **[string][9]** units can be degrees, radians, miles, or kilometers (optional, default `'kilometers'`)
16
- - `options.reverse` **[boolean][10]** reverses coordinates to start the first chunked segment at the end (optional, default `false`)
12
+ * `geojson` **([FeatureCollection][2] | [Geometry][3] | [Feature][4]<([LineString][5] | [MultiLineString][6])>)** the lines to split
13
+ * `segmentLength` **[number][7]** how long to make each segment
14
+ * `options` **[Object][8]** Optional parameters (optional, default `{}`)
17
15
 
18
- **Examples**
16
+ * `options.units` **[string][9]** units can be degrees, radians, miles, or kilometers (optional, default `'kilometers'`)
17
+ * `options.reverse` **[boolean][10]** reverses coordinates to start the first chunked segment at the end (optional, default `false`)
18
+
19
+ ### Examples
19
20
 
20
21
  ```javascript
21
22
  var line = turf.lineString([[-95, 40], [-93, 45], [-85, 50]]);
@@ -26,7 +27,7 @@ var chunk = turf.lineChunk(line, 15, {units: 'miles'});
26
27
  var addToMap = [chunk];
27
28
  ```
28
29
 
29
- Returns **[FeatureCollection][2]&lt;[LineString][5]>** collection of line segments
30
+ Returns **[FeatureCollection][2]<[LineString][5]>** collection of line segments
30
31
 
31
32
  [1]: https://tools.ietf.org/html/rfc7946#section-3.1.4
32
33
 
package/dist/es/index.js CHANGED
File without changes
package/dist/js/index.js CHANGED
File without changes
package/index.d.ts CHANGED
@@ -2,10 +2,10 @@ import {
2
2
  LineString,
3
3
  MultiLineString,
4
4
  GeometryCollection,
5
- Units,
6
5
  Feature,
7
6
  FeatureCollection,
8
- } from "@turf/helpers";
7
+ } from "geojson";
8
+ import { Units } from "@turf/helpers";
9
9
 
10
10
  /**
11
11
  * http://turfjs.org/docs/#lineChunk
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@turf/line-chunk",
3
- "version": "6.5.0",
3
+ "version": "7.0.0-alpha.0",
4
4
  "description": "turf line-chunk module",
5
5
  "author": "Turf Authors",
6
6
  "contributors": [
@@ -50,10 +50,10 @@
50
50
  "docs": "node ../../scripts/generate-readmes",
51
51
  "test": "npm-run-all test:*",
52
52
  "test:tape": "node -r esm test.js",
53
- "test:types": "tsc --esModuleInterop --noEmit types.ts"
53
+ "test:types": "tsc --esModuleInterop --noEmit --strict types.ts"
54
54
  },
55
55
  "devDependencies": {
56
- "@turf/truncate": "^6.5.0",
56
+ "@turf/truncate": "^7.0.0-alpha.0",
57
57
  "benchmark": "*",
58
58
  "load-json-file": "*",
59
59
  "npm-run-all": "*",
@@ -62,10 +62,10 @@
62
62
  "write-json-file": "*"
63
63
  },
64
64
  "dependencies": {
65
- "@turf/helpers": "^6.5.0",
66
- "@turf/length": "^6.5.0",
67
- "@turf/line-slice-along": "^6.5.0",
68
- "@turf/meta": "^6.5.0"
65
+ "@turf/helpers": "^7.0.0-alpha.0",
66
+ "@turf/length": "^7.0.0-alpha.0",
67
+ "@turf/line-slice-along": "^7.0.0-alpha.0",
68
+ "@turf/meta": "^7.0.0-alpha.0"
69
69
  },
70
- "gitHead": "5375941072b90d489389db22b43bfe809d5e451e"
70
+ "gitHead": "0edc4c491b999e5ace770a61e1cf549f7c004189"
71
71
  }