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

@koopjs/winnow

Package Overview
Dependencies
Maintainers
7
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@koopjs/winnow - npm Package Compare versions

Comparing version 5.0.2 to 5.0.3

7

package.json
{
"name": "@koopjs/winnow",
"version": "5.0.2",
"version": "5.0.3",
"description": "Apply sql-like filters to GeoJSON",

@@ -50,3 +50,2 @@ "main": "src/index.js",

"@terraformer/arcgis": "^2.1.2",
"@terraformer/spatial": "^2.1.2",
"@turf/bbox-polygon": "^6.5.0",

@@ -61,3 +60,3 @@ "@turf/boolean-contains": "^6.5.0",

"@types/geojson": "^7946.0.14",
"alasql": "^4.3.3",
"alasql": "^4.4.0",
"classybrew": "0.0.3",

@@ -79,3 +78,3 @@ "joi": "^17.13.1",

"proxyquire": "^2.1.3",
"sinon": "^17.0.1",
"sinon": "^18.0.0",
"tap-min": "^3.0.0",

@@ -82,0 +81,0 @@ "tape": "^5.7.5"

@@ -8,11 +8,19 @@ const Classifier = require('classybrew');

function calculateClassBreaks(features, classification) {
if (!classification.method) throw new Error('must supply classification.method');
if (!classification.breakCount) throw new Error('must supply classification.breakCount');
if (!classification.method) {
throw new Error('must supply classification.method');
}
if (!classification.breakCount) {
throw new Error('must supply classification.breakCount');
}
const values = classification.normType
? normalizeClassificationValues(features, classification)
: getFieldValues(features, classification.field);
// limit break count to num values
if (classification.breakCount > values.length) classification.breakCount = values.length;
// limit break count to num values - 1; [1, 2, 3, 4, 5, 6] => [1-2, 2-3, 3-4, 4-5, 5-6]
if (classification.breakCount > values.length) {
classification.breakCount = values.length - 1;
}
// calculate break ranges [ [a-b], [b-c], ...] from input values

@@ -19,0 +27,0 @@ const classBreakArray = transformValuesToClassBreaksArray(values, classification);

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