Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@turf/mask

Package Overview
Dependencies
Maintainers
4
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@turf/mask - npm Package Compare versions

Comparing version 5.0.5 to 5.1.0

main.mjs

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);

19

package.json
{
"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)&lt;([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)&lt;[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)&lt;([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)&lt;[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)&lt;[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)&lt;[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:

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc