{"name":"@turf/line-slice","version":"3.14.2","keywords":["turf","linestring","geojson","linear","reference","line","distance"],"author":{"name":"Turf Authors"},"license":"MIT","_id":"@turf/line-slice@3.14.2","homepage":"https://github.com/Turfjs/turf","bugs":{"url":"https://github.com/Turfjs/turf/issues"},"dist":{"shasum":"5ef09190bc64b6a7b7dd988567246c9bd25bbdda","tarball":"http://registry-npm.ywwl.com/@turf/line-slice/download/@turf/line-slice-3.14.2.tgz","integrity":"sha512-VX+AvQ7rfIgE8AgbFlOfcRPvV5JYAXFYdaU4MPjc8KGUZePMadsUF5o8OktDsSRuct4oSHVp/YeqUL1q/umCsw==","signatures":[{"sig":"MEUCIGrRV6yCEkQEvNKj6/QcfWXsG2+0VVmxhjqGs6c7/c7cAiEAkURoALwICXhpVA1x4J5pP02lgzQ0d1mrKFCqNrara1w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"size":2812,"noattachment":false,"key":"/@turf/line-slice/-/@turf/line-slice-3.14.2.tgz"},"main":"index.js","_from":".","files":["index.js","index.d.ts"],"types":"index.d.ts","_shasum":"5ef09190bc64b6a7b7dd988567246c9bd25bbdda","scripts":{"test":"node test.js","bench":"node bench.js"},"_npmUser":{"name":"deniscarriere","email":"carriere.denis@gmail.com"},"repository":{"url":"git://github.com/Turfjs/turf.git","type":"git"},"_npmVersion":"3.10.10","description":"turf line-slice module","directories":{},"_nodeVersion":"6.9.5","dependencies":{"@turf/bearing":"^3.14.0","@turf/helpers":"^3.13.0","@turf/distance":"^3.14.0","@turf/destination":"^3.14.0","@turf/point-on-line":"^3.14.2"},"devDependencies":{"tape":"^3.5.0","eslint":"^3.16.1","mkdirp":"^0.5.1","benchmark":"^1.0.0","@turf/helpers":"^3.13.0","@turf/truncate":"^3.13.0","load-json-file":"^2.0.0","write-json-file":"^2.0.0","eslint-config-mourner":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/line-slice-3.14.2.tgz_1490499712776_0.4694730176124722","host":"packages-18-east.internal.npmjs.com"},"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":1490499714640,"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":1490499714640,"dist-tags":{"canary":"3.5.2-alpha.d2c36ee7","latest":"7.4.0","prerelease":"7.1.0-alpha.70"}}