{"id":19721881,"url":"https://github.com/turfjs/turf-line-slice-at-intersection","last_synced_at":"2025-09-07T01:35:47.435Z","repository":{"id":48011851,"uuid":"44269332","full_name":"Turfjs/turf-line-slice-at-intersection","owner":"Turfjs","description":"Segment a LineString by Features","archived":false,"fork":false,"pushed_at":"2024-04-09T09:15:48.000Z","size":14,"stargazers_count":6,"open_issues_count":4,"forks_count":3,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-08-21T18:03:59.554Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Turfjs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-10-14T18:51:42.000Z","updated_at":"2024-02-05T07:59:29.000Z","dependencies_parsed_at":"2024-06-20T22:08:35.108Z","dependency_job_id":null,"html_url":"https://github.com/Turfjs/turf-line-slice-at-intersection","commit_stats":{"total_commits":13,"total_committers":1,"mean_commits":13.0,"dds":0.0,"last_synced_commit":"0af979fe5401de68d96dbb2cac0a21c57904c55a"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/Turfjs/turf-line-slice-at-intersection","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Turfjs%2Fturf-line-slice-at-intersection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Turfjs%2Fturf-line-slice-at-intersection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Turfjs%2Fturf-line-slice-at-intersection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Turfjs%2Fturf-line-slice-at-intersection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Turfjs","download_url":"https://codeload.github.com/Turfjs/turf-line-slice-at-intersection/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Turfjs%2Fturf-line-slice-at-intersection/sbom","scorecard":{"id":144392,"data":{"date":"2025-08-11","repo":{"name":"github.com/Turfjs/turf-line-slice-at-intersection","commit":"0af979fe5401de68d96dbb2cac0a21c57904c55a"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/13 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-16T09:05:32.168Z","repository_id":48011851,"created_at":"2025-08-16T09:05:32.169Z","updated_at":"2025-08-16T09:05:32.169Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273986613,"owners_count":25202704,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-06T02:00:13.247Z","response_time":2576,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T23:15:51.604Z","updated_at":"2025-09-07T01:35:47.408Z","avatar_url":"https://github.com/Turfjs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# turf-line-slice-at-intersection\n\nSlice a line whenever it intersects other features\n\n\n### `turf.line-slice-at-intersection(line, segmenter)`\n\nTakes a LineString and a Feature to segment it by.\n\nAny time the line intersects the feature, it will be segmented.\n\n### Parameters\n\n| parameter   | type                    | description                  |\n| ----------- | ----------------------- | ---------------------------- |\n| `line`      | Feature\\.\\\u003cLineString\\\u003e | line to segment              |\n| `segmenter` | Feature                 | feature to segment `line` by |\n\n\n### Example\n\n```js\nvar line = {\n  \"type\": \"Feature\",\n  \"properties\": {},\n  \"geometry\": {\n    \"type\": \"LineString\",\n    \"coordinates\": [\n      [\n        -24.78515625,\n        2.7235830833483856\n      ],\n      [\n        -22.8515625,\n        2.1967272417616712\n      ],\n      [\n        -20.390625,\n        5.003394345022162\n      ],\n      [\n        -18.984375,\n        2.6357885741666065\n      ],\n      [\n        -14.94140625,\n        4.8282597468669755\n      ],\n      [\n        -11.337890625,\n        7.536764322084078\n      ],\n      [\n        -9.052734375,\n        3.601142320158722\n      ],\n      [\n        -6.328125,\n        0.3515602939922709\n      ]\n    ]\n  }\n};\n\nvar poly = {\n  \"type\": \"Feature\",\n  \"properties\": {},\n  \"geometry\": {\n    \"type\": \"Polygon\",\n    \"coordinates\": [\n      [\n        [\n          -20.91796875,\n          9.882275493429953\n        ],\n        [\n          -22.67578125,\n          6.926426847059551\n        ],\n        [\n          -21.005859375,\n          1.6696855009865839\n        ],\n        [\n          -18.45703125,\n          5.090944175033399\n        ],\n        [\n          -16.083984375,\n          1.845383988573187\n        ],\n        [\n          -13.798828125,\n          8.928487062665504\n        ],\n        [\n          -20.91796875,\n          9.882275493429953\n        ]\n      ]\n    ]\n  }\n};\n\nvar features = turf.featurecollection([line,poly])\n//=features\n\nvar result = turf.lineSliceAtIntersection(line, poly);\n\nresult.features.forEach(function(ft, ind) {\n  ft.properties.stroke = (ind % 2 === 0) ? '#f40' : '#389979';\n});\n\n//=result\n```\n\n\n**Returns** `FeatureCollection.\u003cLineString\u003e`, segmented lines\n\n## Installation\n\nRequires [nodejs](http://nodejs.org/).\n\n```sh\n$ npm install turf-line-slice-at-intersection\n```\n\n## Tests\n\n```sh\n$ npm test\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fturfjs%2Fturf-line-slice-at-intersection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fturfjs%2Fturf-line-slice-at-intersection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fturfjs%2Fturf-line-slice-at-intersection/lists"}