{"name":"@turf/line-slice","version":"7.0.0-alpha.0","keywords":["turf","linestring","geojson","linear","reference","line","distance"],"author":{"name":"Turf Authors"},"license":"MIT","_id":"@turf/line-slice@7.0.0-alpha.0","homepage":"https://github.com/Turfjs/turf","bugs":{"url":"https://github.com/Turfjs/turf/issues"},"dist":{"shasum":"212b3af44f5af3880d888dbf649950ef783d074b","tarball":"http://registry-npm.ywwl.com/@turf/line-slice/download/@turf/line-slice-7.0.0-alpha.0.tgz","fileCount":7,"integrity":"sha512-e2WZGX+7+yeYmgKxIjO8xTyrFg+pSwyTDBhTNOP9Kq+r26vcivTnVT2UUbpGnAzHIWTw1OPyHzRQK47BJTI/6g==","signatures":[{"sig":"MEYCIQD7B0zHHw31EBgUY4kgpFdSCx0Ui1fQ6R2dvzQHx0vy1AIhAMI5a0YmP2LGCH7A7Q2ClfW0d3vKKUrVNSHpFB3bagOf","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9065,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJja8O5ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmot6g/+IGxlRthrF1P+FMQ1Hl0RmHPdWwXY/MvWy6ivoYHc3Jn+B1fO\r\n4nBEujpoUachwdKMxsrBhT1f4rJ09e/XlLbnRVpVmhqB5cH1F1y7vGiDkxmq\r\noasQDA7P2NiLcUA/vvvawKZb/xA9eoQWXNSlSMilDfTSNIgaLk2cMiL1d+ui\r\n1aJQVh417RlfAHrAfUzG80439KKrG3dyEwhWc4on4f9pllE97hcO1BUq+jWJ\r\nSyV+VKbeFvIgJ/eme+lOOvUwso1o4WiVHf00N5NBDugbAS/YSQPFCcOQxQaz\r\nhmL7pJHFpk1jBdD12Xwv/MxQUiHY+UyKNOhCKqnLTnuq1LA7MwahoCDZz5Ov\r\nJSi7cZ4+V2ySkqL01FxPLNC2jvdZgY2pzdYaGht0PMazp2HPUibWvSBTGf6f\r\nlhferAzH0gCPC7UhTeJgbYIHIaLGt/Ai2+QX3EZD5hc2qJrpCyQUE1P2U+y3\r\nCf1OWK0kSzLfRD21bkPekvdD6hwYlbN+5eGzGACKR6iIrkJpdKVIsVg6Zy07\r\nVQlGTJBek62f8A9bhbAAZQIPrIFX3MvE5JuOJlJX1QKwaxiF4ZWgE7Ha+Chx\r\nd+RnUkFdOTqpxpyE7TAH15onW7HrflsbRVmh1M0RZ/oIV2TiopKzT9G3qBjW\r\nOUGd0lKrGWD+T5kW894ktbzi/fnoJMj+ftU=\r\n=RFgW\r\n-----END PGP SIGNATURE-----\r\n","size":3197,"noattachment":false,"key":"/@turf/line-slice/-/@turf/line-slice-7.0.0-alpha.0.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"},"./package.json":"./package.json"},"funding":"https://opencollective.com/turf","gitHead":"0edc4c491b999e5ace770a61e1cf549f7c004189","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","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/4.0.0/node@v19.0.1+arm64 (darwin)","description":"turf line-slice module","directories":{},"sideEffects":false,"_nodeVersion":"19.0.1","dependencies":{"@turf/helpers":"^7.0.0-alpha.0","@turf/invariant":"^7.0.0-alpha.0","@turf/nearest-point-on-line":"^7.0.0-alpha.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"tape":"*","rollup":"*","benchmark":"*","npm-run-all":"*","@turf/truncate":"^7.0.0-alpha.0","load-json-file":"*","write-json-file":"*"},"_npmOperationalInternal":{"tmp":"tmp/line-slice_7.0.0-alpha.0_1668006840939_0.5032527833874394","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":1668006841167,"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":1668006841167,"dist-tags":{"canary":"3.5.2-alpha.d2c36ee7","latest":"7.4.0","prerelease":"7.1.0-alpha.70"}}