build: update distribution (#3583)
This commit is contained in:
parent
7700249a1d
commit
41aa45058f
10
dist/index.js
vendored
10
dist/index.js
vendored
@ -35689,7 +35689,8 @@ __nccwpck_require__.r(__webpack_exports__);
|
|||||||
|
|
||||||
// EXPORTS
|
// EXPORTS
|
||||||
__nccwpck_require__.d(__webpack_exports__, {
|
__nccwpck_require__.d(__webpack_exports__, {
|
||||||
"default": () => (/* binding */ pLimit)
|
"default": () => (/* binding */ pLimit),
|
||||||
|
limitFunction: () => (/* binding */ limitFunction)
|
||||||
});
|
});
|
||||||
|
|
||||||
;// CONCATENATED MODULE: ./node_modules/yocto-queue/index.js
|
;// CONCATENATED MODULE: ./node_modules/yocto-queue/index.js
|
||||||
@ -35865,6 +35866,13 @@ function pLimit(concurrency) {
|
|||||||
return generator;
|
return generator;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function limitFunction(function_, option) {
|
||||||
|
const {concurrency} = option;
|
||||||
|
const limit = pLimit(concurrency);
|
||||||
|
|
||||||
|
return (...arguments_) => limit(() => function_(...arguments_));
|
||||||
|
}
|
||||||
|
|
||||||
function validateConcurrency(concurrency) {
|
function validateConcurrency(concurrency) {
|
||||||
if (!((Number.isInteger(concurrency) || concurrency === Number.POSITIVE_INFINITY) && concurrency > 0)) {
|
if (!((Number.isInteger(concurrency) || concurrency === Number.POSITIVE_INFINITY) && concurrency > 0)) {
|
||||||
throw new TypeError('Expected `concurrency` to be a number from 1 and up');
|
throw new TypeError('Expected `concurrency` to be a number from 1 and up');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user