-
Notifications
You must be signed in to change notification settings - Fork 944
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stop turf-mask mutating by default, make it an option (#2635)
* Add a new test for the behavior we want * Add mutate option & default to cloning the mask input unless mutate is set to true. Also, add another test for this. * update docs * fix pnpm-lock.yaml * Update benchmark to include new `mutate` option * cleanup * Bringing recent TS version of mask into this PR. Should hopefully minimise conflicts required to be resolved before merging. * Missed adding @turf/clone to the prod dependencies. * Add new arg to type tests * resolve TypeScript error in bench.ts * Remove benchmark skipped input multi-polygon.geojson overlapping.geojson --------- Co-authored-by: James Beard <james@smallsaucepan.com> Co-authored-by: mfedderly <24275386+mfedderly@users.noreply.github.com>
- Loading branch information
1 parent
c8f24e0
commit 7275eb9
Showing
7 changed files
with
97 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,3 +22,4 @@ const poly2 = polygon([ | |
|
||
mask(poly1); | ||
mask(poly1, poly2); | ||
mask(poly1, poly2, { mutate: true }); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.