@turf/mask
Advanced tools
Comparing version 5.0.5 to 5.1.0
10
main.js
@@ -111,3 +111,3 @@ 'use strict'; | ||
function unionPolygons(polygons) { | ||
if (polygons.features.length <= 1) return polygons; | ||
if (polygons.features.length <= 1) { return polygons; } | ||
@@ -119,4 +119,6 @@ var tree = createIndex(polygons); | ||
meta.flattenEach(polygons, function (currentFeature, currentIndex) { | ||
var this$1 = this; | ||
// Exclude any removed features | ||
if (removed[currentIndex]) return true; | ||
if (removed[currentIndex]) { return true; } | ||
@@ -143,6 +145,6 @@ // Don't search for itself | ||
polys.push(currentFeature); | ||
currentFeature = union.apply(this, polys); | ||
currentFeature = union.apply(this$1, polys); | ||
} | ||
// Done | ||
if (search.length === 0) break; | ||
if (search.length === 0) { break; } | ||
} | ||
@@ -149,0 +151,0 @@ results.push(currentFeature); |
{ | ||
"name": "@turf/mask", | ||
"version": "5.0.5", | ||
"version": "5.1.0", | ||
"description": "turf mask module", | ||
"main": "main", | ||
"module": "index", | ||
"jsnext:main": "index", | ||
"main": "main.js", | ||
"module": "main.mjs", | ||
"types": "index.d.ts", | ||
@@ -12,3 +11,4 @@ "files": [ | ||
"index.d.ts", | ||
"main.js" | ||
"main.js", | ||
"main.mjs" | ||
], | ||
@@ -42,2 +42,3 @@ "scripts": { | ||
"rollup": "*", | ||
"rollup-plugin-buble": "*", | ||
"tape": "*", | ||
@@ -47,6 +48,6 @@ "write-json-file": "*" | ||
"dependencies": { | ||
"@turf/bbox": "^5.0.4", | ||
"@turf/helpers": "^5.0.4", | ||
"@turf/meta": "^5.0.4", | ||
"@turf/union": "*", | ||
"@turf/bbox": "^5.1.0", | ||
"@turf/helpers": "^5.1.0", | ||
"@turf/meta": "^5.1.0", | ||
"@turf/union": "^5.1.0", | ||
"rbush": "^2.0.1" | ||
@@ -53,0 +54,0 @@ }, |
@@ -7,8 +7,8 @@ # @turf/mask | ||
Takes any type of [polygon](http://geojson.org/geojson-spec.html#polygon) and an optional mask and returns a [polygon](http://geojson.org/geojson-spec.html#polygon) exterior ring with holes. | ||
Takes any type of [polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) and an optional mask and returns a [polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) exterior ring with holes. | ||
**Parameters** | ||
- `polygon` **([FeatureCollection](http://geojson.org/geojson-spec.html#feature-collection-objects) \| [Feature](http://geojson.org/geojson-spec.html#feature-objects)<([Polygon](http://geojson.org/geojson-spec.html#polygon) \| [MultiPolygon](http://geojson.org/geojson-spec.html#multipolygon))>)** GeoJSON Polygon used as interior rings or holes. | ||
- `mask` **[Feature](http://geojson.org/geojson-spec.html#feature-objects)<[Polygon](http://geojson.org/geojson-spec.html#polygon)>?** GeoJSON Polygon used as the exterior ring (if undefined, the world extent is used) | ||
- `polygon` **([FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) \| [Feature](https://tools.ietf.org/html/rfc7946#section-3.2)<([Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) \| [MultiPolygon](https://tools.ietf.org/html/rfc7946#section-3.1.7))>)** GeoJSON Polygon used as interior rings or holes. | ||
- `mask` **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)>?** GeoJSON Polygon used as the exterior ring (if undefined, the world extent is used) | ||
@@ -27,3 +27,3 @@ **Examples** | ||
Returns **[Feature](http://geojson.org/geojson-spec.html#feature-objects)<[Polygon](http://geojson.org/geojson-spec.html#polygon)>** Masked Polygon (exterior ring with holes). | ||
Returns **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)>** Masked Polygon (exterior ring with holes). | ||
@@ -30,0 +30,0 @@ <!-- This file is automatically generated. Please don't edit it directly: |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Wildcard dependency
QualityPackage has a dependency with a floating version range. This can cause issues if the dependency publishes a new major version.
Found 1 instance in 1 package
21709
7
513
0
8
+ Added@turf/union@5.1.5(transitive)
+ Addedturf-jsts@1.2.3(transitive)
- Removed@turf/helpers@7.2.0(transitive)
- Removed@turf/meta@7.2.0(transitive)
- Removed@turf/union@7.2.0(transitive)
- Removed@types/geojson@7946.0.15(transitive)
- Removedbignumber.js@9.1.2(transitive)
- Removedpolyclip-ts@0.16.8(transitive)
- Removedsplaytree-ts@1.0.2(transitive)
- Removedtslib@2.8.1(transitive)
Updated@turf/bbox@^5.1.0
Updated@turf/helpers@^5.1.0
Updated@turf/meta@^5.1.0
Updated@turf/union@^5.1.0