maximize-iterator
Advanced tools
+1
-1
@@ -21,3 +21,3 @@ var nextCallback = require('iterator-next-callback'); | ||
| each: fn, | ||
| async: options.async, | ||
| callbacks: options.callbacks || options.async, | ||
| concurrency: options.concurrency || DEFAULT_CONCURRENCY, | ||
@@ -24,0 +24,0 @@ limit: options.limit || DEFAULT_LIMIT, |
@@ -46,3 +46,3 @@ var compat = require('async-compat'); | ||
| } | ||
| compat.asyncFunction(options.each, options.async, value, function (err, keep) { | ||
| compat.asyncFunction(options.each, options.callbacks, value, function (err, keep) { | ||
| return !processResult(err, keep, options, callback) && !isProcessing ? processor() : undefined; | ||
@@ -49,0 +49,0 @@ }); |
+1
-1
| { | ||
| "name": "maximize-iterator", | ||
| "version": "2.5.1", | ||
| "version": "2.6.0", | ||
| "description": "Maximize the parallel calls of an iterator supporting asyncIterator interface", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
+7
-0
@@ -20,1 +20,8 @@ ## maximize-iterator | ||
| ``` | ||
| **forEach Options**: | ||
| - bool: callbacks - use an each function with a callback `function(entry, callback)` (default: false) | ||
| - number: concurrency - parallelism of processing. (default: Infinity) | ||
| - number: limit - maximum number to process. (default: Infinity) | ||
| - number: batch - per batch count to limit expansion. (default: 10) |
6692
5.65%27
35%