promise-queue
Advanced tools
Comparing version 2.2.3 to 2.2.4
@@ -72,3 +72,4 @@ /* global define, Promise */ | ||
*/ | ||
function Queue(maxPendingPromises, maxQueuedPromises) { | ||
function Queue(maxPendingPromises, maxQueuedPromises, options) { | ||
this.options = options = options || {}; | ||
this.pendingPromises = 0; | ||
@@ -144,2 +145,5 @@ this.maxPendingPromises = typeof maxPendingPromises !== 'undefined' ? maxPendingPromises : Infinity; | ||
if (!item) { | ||
if (this.options.onEmpty) { | ||
this.options.onEmpty(); | ||
} | ||
return false; | ||
@@ -146,0 +150,0 @@ } |
@@ -5,3 +5,3 @@ { | ||
"name": "promise-queue", | ||
"version": "2.2.3", | ||
"version": "2.2.4", | ||
"contributors": [ | ||
@@ -8,0 +8,0 @@ "Mikhail Davydov <i@azproduction.ru>" |
24109
515