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

@turf/square-grid

Package Overview
Dependencies
Maintainers
4
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@turf/square-grid - npm Package Compare versions

Comparing version 5.1.1 to 5.1.5

main.es.js

16

main.js

@@ -34,3 +34,3 @@ 'use strict';

options = options || {};
if (!helpers.isObject(options)) { throw new Error('options is invalid'); }
if (!helpers.isObject(options)) throw new Error('options is invalid');
// var units = options.units;

@@ -44,8 +44,8 @@ var properties = options.properties;

// Input Validation
if (cellSide === null || cellSide === undefined) { throw new Error('cellSide is required'); }
if (!helpers.isNumber(cellSide)) { throw new Error('cellSide is invalid'); }
if (!bbox) { throw new Error('bbox is required'); }
if (!Array.isArray(bbox)) { throw new Error('bbox must be array'); }
if (bbox.length !== 4) { throw new Error('bbox must contain 4 numbers'); }
if (mask && ['Polygon', 'MultiPolygon'].indexOf(invariant.getType(mask)) === -1) { throw new Error('options.mask must be a (Multi)Polygon'); }
if (cellSide === null || cellSide === undefined) throw new Error('cellSide is required');
if (!helpers.isNumber(cellSide)) throw new Error('cellSide is invalid');
if (!bbox) throw new Error('bbox is required');
if (!Array.isArray(bbox)) throw new Error('bbox must be array');
if (bbox.length !== 4) throw new Error('bbox must contain 4 numbers');
if (mask && ['Polygon', 'MultiPolygon'].indexOf(invariant.getType(mask)) === -1) throw new Error('options.mask must be a (Multi)Polygon');

@@ -85,3 +85,3 @@ var west = bbox[0];

if (mask) {
if (intersect(mask, cellPoly)) { results.push(cellPoly); }
if (intersect(mask, cellPoly)) results.push(cellPoly);
} else {

@@ -88,0 +88,0 @@ results.push(cellPoly);

{
"name": "@turf/square-grid",
"version": "5.1.1",
"version": "5.1.5",
"description": "turf square-grid module",
"main": "main.js",
"module": "main.mjs",
"module": "main.es.js",
"types": "index.d.ts",

@@ -12,3 +12,3 @@ "files": [

"main.js",
"main.mjs"
"main.es.js"
],

@@ -18,2 +18,3 @@ "scripts": {

"test": "node -r @std/esm test.js",
"posttest": "node -r @std/esm ../../scripts/validate-es5-dependencies.js",
"bench": "node -r @std/esm bench.js",

@@ -41,7 +42,6 @@ "docs": "node ../../scripts/generate-readmes"

"@std/esm": "*",
"@turf/bbox-polygon": "^5.1.0",
"@turf/truncate": "^5.1.0",
"@turf/bbox-polygon": "^5.1.5",
"@turf/truncate": "^5.1.5",
"benchmark": "*",
"rollup": "*",
"rollup-plugin-buble": "*",
"tape": "*",

@@ -51,8 +51,8 @@ "write-json-file": "*"

"dependencies": {
"@turf/boolean-contains": "^5.1.0",
"@turf/boolean-overlap": "^5.1.1",
"@turf/distance": "^5.1.0",
"@turf/helpers": "^5.1.0",
"@turf/intersect": "^5.1.0",
"@turf/invariant": "^5.1.0"
"@turf/boolean-contains": "^5.1.5",
"@turf/boolean-overlap": "^5.1.5",
"@turf/distance": "^5.1.5",
"@turf/helpers": "^5.1.5",
"@turf/intersect": "^5.1.5",
"@turf/invariant": "^5.1.5"
},

@@ -59,0 +59,0 @@ "@std/esm": {

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