From bb88e27d3f9cc69c8bc689eba126096c6fe3dded Mon Sep 17 00:00:00 2001 From: actions-bot <58130806+actions-bot@users.noreply.github.com> Date: Fri, 27 Dec 2024 10:23:11 +0000 Subject: [PATCH] build: update distribution (#3583) --- dist/index.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/dist/index.js b/dist/index.js index b555e947bd..d20f16fa2a 100644 --- a/dist/index.js +++ b/dist/index.js @@ -35664,7 +35664,8 @@ __nccwpck_require__.r(__webpack_exports__); // EXPORTS __nccwpck_require__.d(__webpack_exports__, { - "default": () => (/* binding */ pLimit) + "default": () => (/* binding */ pLimit), + limitFunction: () => (/* binding */ limitFunction) }); ;// CONCATENATED MODULE: ./node_modules/yocto-queue/index.js @@ -35840,6 +35841,13 @@ function pLimit(concurrency) { return generator; } +function limitFunction(function_, option) { + const {concurrency} = option; + const limit = pLimit(concurrency); + + return (...arguments_) => limit(() => function_(...arguments_)); +} + function validateConcurrency(concurrency) { if (!((Number.isInteger(concurrency) || concurrency === Number.POSITIVE_INFINITY) && concurrency > 0)) { throw new TypeError('Expected `concurrency` to be a number from 1 and up');