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

@turf/line-chunk

Package Overview
Dependencies
Maintainers
7
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@turf/line-chunk - npm Package Compare versions

Comparing version 6.5.0 to 7.0.0-alpha.0

4

index.d.ts

@@ -5,6 +5,6 @@ import {

GeometryCollection,
Units,
Feature,
FeatureCollection,
} from "@turf/helpers";
} from "geojson";
import { Units } from "@turf/helpers";

@@ -11,0 +11,0 @@ /**

{
"name": "@turf/line-chunk",
"version": "6.5.0",
"version": "7.0.0-alpha.0",
"description": "turf line-chunk module",

@@ -53,6 +53,6 @@ "author": "Turf Authors",

"test:tape": "node -r esm test.js",
"test:types": "tsc --esModuleInterop --noEmit types.ts"
"test:types": "tsc --esModuleInterop --noEmit --strict types.ts"
},
"devDependencies": {
"@turf/truncate": "^6.5.0",
"@turf/truncate": "^7.0.0-alpha.0",
"benchmark": "*",

@@ -66,8 +66,8 @@ "load-json-file": "*",

"dependencies": {
"@turf/helpers": "^6.5.0",
"@turf/length": "^6.5.0",
"@turf/line-slice-along": "^6.5.0",
"@turf/meta": "^6.5.0"
"@turf/helpers": "^7.0.0-alpha.0",
"@turf/length": "^7.0.0-alpha.0",
"@turf/line-slice-along": "^7.0.0-alpha.0",
"@turf/meta": "^7.0.0-alpha.0"
},
"gitHead": "5375941072b90d489389db22b43bfe809d5e451e"
"gitHead": "0edc4c491b999e5ace770a61e1cf549f7c004189"
}

@@ -10,12 +10,13 @@ # @turf/line-chunk

**Parameters**
### Parameters
- `geojson` **([FeatureCollection][2] \| [Geometry][3] \| [Feature][4]<([LineString][5] \| [MultiLineString][6])>)** the lines to split
- `segmentLength` **[number][7]** how long to make each segment
- `options` **[Object][8]** Optional parameters (optional, default `{}`)
- `options.units` **[string][9]** units can be degrees, radians, miles, or kilometers (optional, default `'kilometers'`)
- `options.reverse` **[boolean][10]** reverses coordinates to start the first chunked segment at the end (optional, default `false`)
* `geojson` **([FeatureCollection][2] | [Geometry][3] | [Feature][4]<([LineString][5] | [MultiLineString][6])>)** the lines to split
* `segmentLength` **[number][7]** how long to make each segment
* `options` **[Object][8]** Optional parameters (optional, default `{}`)
**Examples**
* `options.units` **[string][9]** units can be degrees, radians, miles, or kilometers (optional, default `'kilometers'`)
* `options.reverse` **[boolean][10]** reverses coordinates to start the first chunked segment at the end (optional, default `false`)
### Examples
```javascript

@@ -30,3 +31,3 @@ var line = turf.lineString([[-95, 40], [-93, 45], [-85, 50]]);

Returns **[FeatureCollection][2]&lt;[LineString][5]>** collection of line segments
Returns **[FeatureCollection][2]<[LineString][5]>** collection of line segments

@@ -33,0 +34,0 @@ [1]: https://tools.ietf.org/html/rfc7946#section-3.1.4

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