turf-aggregate
Advanced tools
Comparing version 0.1.1 to 1.0.0
41
index.js
@@ -1,18 +0,18 @@ | ||
var average = require('turf-average') | ||
var sum = require('turf-sum') | ||
var median = require('turf-median') | ||
var min = require('turf-min') | ||
var max = require('turf-max') | ||
var deviation = require('turf-deviation') | ||
var variance = require('turf-variance') | ||
var count = require('turf-count') | ||
var turf = {} | ||
turf.average = average | ||
turf.sum = sum | ||
turf.median = median | ||
turf.min = min | ||
turf.max = max | ||
turf.deviation = deviation | ||
turf.variance = variance | ||
turf.count = count | ||
var average = require('turf-average'); | ||
var sum = require('turf-sum'); | ||
var median = require('turf-median'); | ||
var min = require('turf-min'); | ||
var max = require('turf-max'); | ||
var deviation = require('turf-deviation'); | ||
var variance = require('turf-variance'); | ||
var count = require('turf-count'); | ||
var operations = {}; | ||
operations.average = average; | ||
operations.sum = sum; | ||
operations.median = median; | ||
operations.min = min; | ||
operations.max = max; | ||
operations.deviation = deviation; | ||
operations.variance = variance; | ||
operations.count = count; | ||
@@ -27,9 +27,8 @@ module.exports = function(polygons, points, aggregations){ | ||
if (operation === 'count') { | ||
polygons = turf[operation](polygons, points, agg.outField); | ||
polygons = operations[operation](polygons, points, agg.outField); | ||
} else { | ||
polygons = turf[operation](polygons, points, agg.inField, agg.outField); | ||
polygons = operations[operation](polygons, points, agg.inField, agg.outField); | ||
} | ||
} else { | ||
unrecognizedError = new Error('"'+ operation +'" is not a recognized aggregation operation.'); | ||
return err; | ||
return new Error('"'+ operation +'" is not a recognized aggregation operation.'); | ||
} | ||
@@ -36,0 +35,0 @@ } |
{ | ||
"name": "turf-aggregate", | ||
"version": "0.1.1", | ||
"version": "1.0.0", | ||
"description": "turf aggregate module", | ||
@@ -28,2 +28,3 @@ "main": "index.js", | ||
"devDependencies": { | ||
"benchmark": "^1.0.0", | ||
"tape": "^2.13.3", | ||
@@ -35,3 +36,3 @@ "turf-featurecollection": "^0.1.0", | ||
"dependencies": { | ||
"turf-average": "0.0.2", | ||
"turf-average": "0.1.1", | ||
"turf-count": "0.0.4", | ||
@@ -38,0 +39,0 @@ "turf-deviation": "0.0.2", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
10256
8
184
0
5
1
+ Addedturf-average@0.1.1(transitive)
- Removedturf-average@0.0.2(transitive)
Updatedturf-average@0.1.1