putil-taskqueue
Advanced tools
Comparing version 2.3.0 to 2.4.0
@@ -54,3 +54,3 @@ /* putil-taskqueue | ||
let resolved; | ||
const handleCallback = (err) => { | ||
const handleCallback = (err, result) => { | ||
/* istanbul ignore next */ | ||
@@ -66,3 +66,3 @@ if (resolved) return; | ||
this.emit('task-complete', task); | ||
resolve(); | ||
resolve(result); | ||
} | ||
@@ -79,8 +79,8 @@ if (!this._queue.length) | ||
typeof o.catch === 'function') { | ||
o.then(() => handleCallback()) | ||
o.then((x) => handleCallback(null, x)) | ||
.catch(e => handleCallback(e || 'Rejected')); | ||
} else | ||
handleCallback(); | ||
return; | ||
} | ||
} | ||
handleCallback(null, o); | ||
} catch (e) { | ||
@@ -87,0 +87,0 @@ handleCallback(e); |
{ | ||
"name": "putil-taskqueue", | ||
"description": "Very simple async task queue for Javascript", | ||
"version": "2.3.0", | ||
"version": "2.4.0", | ||
"author": "Panates Ltd.", | ||
@@ -6,0 +6,0 @@ "contributors": [ |
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
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
6781
120