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

@turf/interpolate

Package Overview
Dependencies
Maintainers
4
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@turf/interpolate - npm Package Compare versions

Comparing version 5.1.1 to 5.1.5

main.es.js

16

main.js

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

options = options || {};
if (typeof options !== 'object') { throw new Error('options is invalid'); }
if (typeof options !== 'object') throw new Error('options is invalid');
var gridType = options.gridType;

@@ -52,6 +52,6 @@ var property = options.property;

// validation
if (!points) { throw new Error('points is required'); }
if (!points) throw new Error('points is required');
invariant.collectionOf(points, 'Point', 'input must contain Points');
if (!cellSize) { throw new Error('cellSize is required'); }
if (weight !== undefined && typeof weight !== 'number') { throw new Error('weight must be a number'); }
if (!cellSize) throw new Error('cellSize is required');
if (weight !== undefined && typeof weight !== 'number') throw new Error('weight must be a number');

@@ -95,6 +95,6 @@ // default values

// property has priority for zValue, fallbacks to 3rd coordinate from geometry
if (property !== undefined) { zValue = point.properties[property]; }
if (zValue === undefined) { zValue = point.geometry.coordinates[2]; }
if (zValue === undefined) { throw new Error('zValue is missing'); }
if (d === 0) { zw = zValue; }
if (property !== undefined) zValue = point.properties[property];
if (zValue === undefined) zValue = point.geometry.coordinates[2];
if (zValue === undefined) throw new Error('zValue is missing');
if (d === 0) zw = zValue;
var w = 1.0 / Math.pow(d, weight);

@@ -101,0 +101,0 @@ sw += w;

{
"name": "@turf/interpolate",
"version": "5.1.1",
"version": "5.1.5",
"description": "turf interpolate 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",

@@ -42,3 +43,3 @@ "docs": "node ../../scripts/generate-readmes"

"@std/esm": "*",
"@turf/truncate": "^5.1.0",
"@turf/truncate": "^5.1.5",
"benchmark": "*",

@@ -48,3 +49,2 @@ "chromatism": "*",

"rollup": "*",
"rollup-plugin-buble": "*",
"tape": "*",

@@ -54,13 +54,13 @@ "write-json-file": "*"

"dependencies": {
"@turf/bbox": "^5.1.0",
"@turf/centroid": "^5.1.0",
"@turf/clone": "^5.1.0",
"@turf/distance": "^5.1.0",
"@turf/helpers": "^5.1.0",
"@turf/hex-grid": "^5.1.0",
"@turf/invariant": "^5.1.0",
"@turf/meta": "^5.1.0",
"@turf/point-grid": "^5.1.0",
"@turf/square-grid": "^5.1.1",
"@turf/triangle-grid": "^5.1.0"
"@turf/bbox": "^5.1.5",
"@turf/centroid": "^5.1.5",
"@turf/clone": "^5.1.5",
"@turf/distance": "^5.1.5",
"@turf/helpers": "^5.1.5",
"@turf/hex-grid": "^5.1.5",
"@turf/invariant": "^5.1.5",
"@turf/meta": "^5.1.5",
"@turf/point-grid": "^5.1.5",
"@turf/square-grid": "^5.1.5",
"@turf/triangle-grid": "^5.1.5"
},

@@ -67,0 +67,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