mirror of
https://github.com/actions/labeler.git
synced 2025-12-18 08:06:47 +00:00
build
This commit is contained in:
9
node_modules/p-limit/index.js
generated
vendored
9
node_modules/p-limit/index.js
generated
vendored
@@ -2,8 +2,8 @@
|
||||
const pTry = require('p-try');
|
||||
|
||||
const pLimit = concurrency => {
|
||||
if (concurrency < 1) {
|
||||
throw new TypeError('Expected `concurrency` to be a number from 1 and up');
|
||||
if (!((Number.isInteger(concurrency) || concurrency === Infinity) && concurrency > 0)) {
|
||||
return Promise.reject(new TypeError('Expected `concurrency` to be a number from 1 and up'));
|
||||
}
|
||||
|
||||
const queue = [];
|
||||
@@ -42,6 +42,11 @@ const pLimit = concurrency => {
|
||||
},
|
||||
pendingCount: {
|
||||
get: () => queue.length
|
||||
},
|
||||
clearQueue: {
|
||||
value: () => {
|
||||
queue.length = 0;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user