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 3.13.0 to 3.13.1

27

index.js

@@ -14,14 +14,21 @@ var featureEach = require('@turf/meta').featureEach;

* @return {Feature<Polygon>} Masked Polygon (exterior ring with holes).
* @addToMap masked
* @example
* var poylgon = {
* "type": "Feature",
* "properties": {},
* "geometry": {
* "type": "Polygon",
* "coordinates": [
* [[100, 0], [101, 0], [101,1], [100,1], [100, 0]]
* ]
* }
* var polygon = {
* "type": "Feature",
* "properties": {},
* "geometry": {
* "type": "Polygon",
* "coordinates": [[[112, -21], [116, -36], [146, -39], [153, -24], [133, -10], [112, -21]]]
* }
* }
* var masked = turf.mask(polygon);
* var mask = {
* "type": "Feature",
* "properties": {},
* "geometry": {
* "type": "Polygon",
* "coordinates": [[[90, -55], [170, -55], [170, 10], [90, 10], [90, -55]]]
* }
* }
* var masked = turf.mask(polygon, mask);
* //=masked

@@ -28,0 +35,0 @@ */

{
"name": "@turf/mask",
"version": "3.13.0",
"version": "3.13.1",
"description": "turf mask module",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -15,13 +15,19 @@ # @turf/mask

```javascript
var poylgon = {
"type": "Feature",
"properties": {},
"geometry": {
"type": "Polygon",
"coordinates": [
[[100, 0], [101, 0], [101,1], [100,1], [100, 0]]
]
}
var polygon = {
"type": "Feature",
"properties": {},
"geometry": {
"type": "Polygon",
"coordinates": [[[112, -21], [116, -36], [146, -39], [153, -24], [133, -10], [112, -21]]]
}
}
var masked = turf.mask(polygon);
var mask = {
"type": "Feature",
"properties": {},
"geometry": {
"type": "Polygon",
"coordinates": [[[90, -55], [170, -55], [170, 10], [90, 10], [90, -55]]]
}
}
var masked = turf.mask(polygon, mask);
//=masked

@@ -28,0 +34,0 @@ ```

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