es6-promise-pool
Advanced tools
Comparing version 2.0.0 to 2.1.0
@@ -9,3 +9,5 @@ /* global define */ | ||
} else { | ||
root.promisePool = factory() | ||
root.PromisePool = factory() | ||
// Legacy API | ||
root.promisePool = root.PromisePool | ||
} | ||
@@ -87,4 +89,4 @@ })(this, function () { | ||
if (typeof concurrency !== 'number' || | ||
Math.floor(concurrency) !== concurrency || | ||
concurrency < 1) { | ||
Math.floor(concurrency) !== concurrency || | ||
concurrency < 1) { | ||
throw new Error('Invalid concurrency') | ||
@@ -189,3 +191,3 @@ } | ||
while (this._size < this._concurrency && | ||
!!(promise = this._producer.call(this))) { | ||
!!(promise = this._producer.call(this))) { | ||
this._size++ | ||
@@ -203,6 +205,7 @@ this._trackPromise(promise) | ||
return { | ||
PromisePool: PromisePool, | ||
PromisePoolEvent: PromisePoolEvent | ||
} | ||
PromisePool.PromisePoolEvent = PromisePoolEvent | ||
// Legacy API | ||
PromisePool.PromisePool = PromisePool | ||
return PromisePool | ||
}) |
{ | ||
"name": "es6-promise-pool", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"description": "Runs Promises in a pool that limits their maximum concurrency.", | ||
@@ -5,0 +5,0 @@ "author": { |
@@ -50,6 +50,4 @@ # ES6 Promise Pool | ||
// On the Web, leave out this line and use the script tag above instead. | ||
var promisePool = require('es6-promise-pool') | ||
var PromisePool = require('es6-promise-pool') | ||
var PromisePool = promisePool.PromisePool | ||
var promiseProducer = function () { | ||
@@ -56,0 +54,0 @@ // Your code goes here. |
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
14391
184
196