New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

gear

Package Overview
Dependencies
Maintainers
1
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gear - npm Package Compare versions

Comparing version 0.7.6 to 0.7.7

33

lib/queue.js

@@ -10,2 +10,21 @@ /*

// Zip two arrays together ala Python
function zip(arr1, arr2) {
var zipped = [];
for (var i = 0; i < Math.min(arr1.length, arr2.length); i++) {
zipped.push([arr1[i], arr2[i]]);
}
return zipped;
}
// Turn input into an array even if undefined
function arrayize(arr) {
if (arr === undefined) {
arr = [];
} else if (!Array.isArray(arr)) {
arr = [arr];
}
return arr;
}
/*

@@ -41,11 +60,3 @@ * Queue

case 2: // Add blobs to queue
if (options === undefined) {
options = [];
} else {
if (!Array.isArray(options)) {
options = [options];
}
}
async.map(options, task.bind(this), function(err, results) {
async.map(arrayize(options), task.bind(this), function(err, results) {
done(err, blobs.concat(results));

@@ -59,3 +70,5 @@ });

} else if (task.type === 'slice') { // Select up to options.length blobs
async.map(blobs.slice(0, Array.isArray(options) ? options.length : 1), task.bind(this, options), done);
async.map(zip(arrayize(options), blobs), (function(arr, cb) {
task.call(this, arr[0], arr[1], cb);
}).bind(this), done);
} else { // Transform blob on a per task basis

@@ -62,0 +75,0 @@ async.map(blobs, task.bind(this, options), done);

{
"name": "gear",
"version": "0.7.6",
"version": "0.7.7",
"description": "Gear.js - Task-based build system.",

@@ -5,0 +5,0 @@ "author": "Stephen Murphy <stephen@hypernaut.com>",

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