{"name":"@turf/line-slice","version":"6.2.0-alpha.3","keywords":["turf","linestring","geojson","linear","reference","line","distance"],"author":{"name":"Turf Authors"},"license":"MIT","_id":"@turf/line-slice@6.2.0-alpha.3","homepage":"https://github.com/Turfjs/turf","bugs":{"url":"https://github.com/Turfjs/turf/issues"},"dist":{"shasum":"ea54944c86062cf19e4ef2c40e1ce1f706b7c14c","tarball":"http://registry-npm.ywwl.com/@turf/line-slice/download/@turf/line-slice-6.2.0-alpha.3.tgz","fileCount":8,"integrity":"sha512-UK4nodpLOApaR7s6tRuNua4ZmL4RXlfB7DjvfVekTsnyIcZ7Q0x/fw1Wt8I5RTJGUPQ3NBnZhl7dXrnxglOeqw==","signatures":[{"sig":"MEYCIQC8fbLZdVlvUfLOnc8IF/ZHdzVpvkKfJc2czeSi+5T7bwIhALHp+/ROrpIXpgCt8G3vXqb7EuldmfSoHOWMGw0/hUac","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":10784,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf0o8HCRA9TVsSAnZWagAAX4gP/0/lv0js7Sn+IE14bNab\nztqL9n5Nwe6zUC0q5Fu/lGLli+iThkAxTkzy4V7OjRGk7k/N26zezyrSTQ/g\n6XPItdxzgI93H9gqkxDX6QoAnKrBkiritzeeD38KV/SQqgr7rcHekhdIhM/g\nNJQ1Dr2VgY7yjgDUMXR+KZxKUrLkQPkjEWmTdY7uYBH6kn99IMH3yFoxX/1G\nNQBfVkqfkj9o9Rfi53BHpodClJ+V/RWG9CJEXSJPQtxxAKkiDpWzvoZ4nDg2\nW2RnZX8yyF8gDBMoZbi50R76EeGCYyDoK9rSnYhX/CaHrOYayQgX9lkyFhqz\ncUZ3gLXChB6KEcvLzEQGjyn6DEE985Z1oVJQ2IOtKWY6y9XZP7xwO3wa61+D\nrOhsLSSbtE/fT2FMBEjW07Xdg59+6sA2PY1G7OjYKNJEkZF/0LNhQIM+FXhw\nxCyG0mnM5lGzb38sTPZZp5AVJkBN5oi2m1C32Io0R4L4+ABULMvHWGM6t2l6\nOBkSig/GmaS3EHTgewX71jUI9lVfEqgLOlCn6S2sqDOld1Icjl5NuEVziMOK\n7cbrNJPbOf8pQrF/e4Ls7XRxoEZ6yBqoVtIUHKZqo7u3UQp2J42KXsRgObfo\nN03siszfz35Jd4npwqyxM5y9csFIyVY2bji7gDsQ1JmVD485dWsKY0sgbFc3\njX44\r\n=ATDn\r\n-----END PGP SIGNATURE-----\r\n","size":3258,"noattachment":false,"key":"/@turf/line-slice/-/@turf/line-slice-6.2.0-alpha.3.tgz"},"main":"dist/js/index.js","types":"index.d.ts","module":"dist/es/index.js","exports":{"import":"./dist/es/index.js","require":"./dist/js/index.js"},"gitHead":"dce9edfc705352e8cb9e0083c9330ba0e8d77409","scripts":{"docs":"node ../../scripts/generate-readmes","test":"npm-run-all test:*","bench":"node -r esm bench.js","build":"rollup -c ../../rollup.config.js && echo '{\"type\":\"module\"}' > dist/es/package.json","posttest":"node -r esm ../../scripts/validate-es5-dependencies.js","test:tape":"node -r esm test.js"},"_npmUser":{"name":"mdfedderly","email":"mdfedderly@mdfedderly.com"},"repository":{"url":"git://github.com/Turfjs/turf.git","type":"git"},"_npmVersion":"lerna/3.20.2/node@v13.10.1+x64 (darwin)","description":"turf line-slice module","directories":{},"sideEffects":false,"_nodeVersion":"13.10.1","dependencies":{"@turf/helpers":"^6.2.0-alpha.3","@turf/invariant":"^6.2.0-alpha.3","@turf/nearest-point-on-line":"^6.2.0-alpha.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"tape":"*","rollup":"*","benchmark":"*","npm-run-all":"*","@turf/truncate":"^6.2.0-alpha.3","load-json-file":"*","write-json-file":"*"},"_npmOperationalInternal":{"tmp":"tmp/line-slice_6.2.0-alpha.3_1607634694936_0.49930033510052785","host":"s3://npm-registry-packages"},"readme":"# @turf/line-slice\n\n<!-- Generated by documentation.js. Update this documentation by updating the source code. -->\n\n## lineSlice\n\nTakes a [line][1], a start [Point][2], and a stop point\nand returns a subsection of the line in-between those points.\nThe start & stop points don't need to fall exactly on the line.\n\nThis can be useful for extracting only the part of a route between waypoints.\n\n### Parameters\n\n*   `startPt` **[Coord][3]** starting point\n*   `stopPt` **[Coord][3]** stopping point\n*   `line` **([Feature][4]<[LineString][1]> | [LineString][1])** line to slice\n\n### Examples\n\n```javascript\nvar line = turf.lineString([\n    [-77.031669, 38.878605],\n    [-77.029609, 38.881946],\n    [-77.020339, 38.884084],\n    [-77.025661, 38.885821],\n    [-77.021884, 38.889563],\n    [-77.019824, 38.892368]\n]);\nvar start = turf.point([-77.029609, 38.881946]);\nvar stop = turf.point([-77.021884, 38.889563]);\n\nvar sliced = turf.lineSlice(start, stop, line);\n\n//addToMap\nvar addToMap = [start, stop, line]\n```\n\nReturns **[Feature][4]<[LineString][1]>** sliced line\n\n[1]: https://tools.ietf.org/html/rfc7946#section-3.1.4\n\n[2]: https://tools.ietf.org/html/rfc7946#section-3.1.2\n\n[3]: https://tools.ietf.org/html/rfc7946#section-3.1.1\n\n[4]: https://tools.ietf.org/html/rfc7946#section-3.2\n\n<!-- This file is automatically generated. Please don't edit it directly. If you find an error, edit the source file of the module in question (likely index.js or index.ts), and re-run \"yarn docs\" from the root of the turf project. -->\n\n---\n\nThis module is part of the [Turfjs project](https://turfjs.org/), an open source module collection dedicated to geographic algorithms. It is maintained in the [Turfjs/turf](https://github.com/Turfjs/turf) repository, where you can create PRs and issues.\n\n### Installation\n\nInstall this single module individually:\n\n```sh\n$ npm install @turf/line-slice\n```\n\nOr install the all-encompassing @turf/turf module that includes all modules as functions:\n\n```sh\n$ npm install @turf/turf\n```\n","publish_time":1607634695141,"maintainers":[{"name":"smallsaucepan","email":"james@smallsaucepan.com"},{"name":"morgan.herlocker","email":"morganherlocker@gmail.com"},{"name":"twelch","email":"tim.j.welch@gmail.com"},{"name":"jamesmilneruk","email":"jamesmilner22@hotmail.com"},{"name":"rowanwins","email":"rowanwins@yahoo.com.au"},{"name":"tmcw","email":"tom@macwright.com"},{"name":"morganherlocker","email":"morgan.herlocker@gmail.com"},{"name":"tcql","email":"tim.channell@gmail.com"},{"name":"mdfedderly","email":"mdfedderly@mdfedderly.com"}],"_cnpm_publish_time":1607634695141,"dist-tags":{"canary":"3.5.2-alpha.d2c36ee7","latest":"7.4.0","prerelease":"7.1.0-alpha.70"}}