maximize-iterator
Advanced tools
@@ -21,6 +21,3 @@ "use strict"; | ||
| options = typeof options === 'function' ? {} : options || {}; | ||
| if (typeof callback === 'function') { | ||
| (0, _workerts.default)(iterator, each, options, callback); | ||
| return; | ||
| } | ||
| if (typeof callback === 'function') return (0, _workerts.default)(iterator, each, options, callback); | ||
| return new Promise(function(resolve, reject) { | ||
@@ -27,0 +24,0 @@ return (0, _workerts.default)(iterator, each, options, function(err) { |
@@ -6,7 +6,4 @@ import worker from './worker.js'; | ||
| options = typeof options === 'function' ? {} : options || {}; | ||
| if (typeof callback === 'function') { | ||
| worker(iterator, each, options, callback); | ||
| return; | ||
| } | ||
| if (typeof callback === 'function') return worker(iterator, each, options, callback); | ||
| return new Promise((resolve, reject)=>worker(iterator, each, options, (err)=>err ? reject(err) : resolve())); | ||
| } |
+1
-1
| { | ||
| "name": "maximize-iterator", | ||
| "version": "5.0.4", | ||
| "version": "5.0.5", | ||
| "description": "Maximize the parallel calls of an iterator supporting asyncIterator interface", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
49109
-0.22%362
-1.63%