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

turf-aggregate

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

turf-aggregate - npm Package Compare versions

Comparing version 0.1.1 to 1.0.0

bench.js

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",

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