Gathering detailed insights and metrics for exec-limiter
Gathering detailed insights and metrics for exec-limiter
Gathering detailed insights and metrics for exec-limiter
Gathering detailed insights and metrics for exec-limiter
✂️ Limit parallel shell command execution to <x> calls same time.
npm install exec-limiter
Typescript
Module System
Node Version
NPM Version
98.3
Supply Chain
100
Quality
77
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
59 Commits
3 Forks
2 Watchers
1 Branches
2 Contributors
Updated on Feb 13, 2025
Latest Version
3.2.14
Package Id
exec-limiter@3.2.14
Unpacked Size
11.62 kB
Size
4.54 kB
File Count
4
NPM Version
10.9.2
Node Version
23.6.0
Published on
Feb 13, 2025
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
Limit the shell execution commands to
calls same time.
1# Using npm 2npm install --save exec-limiter 3 4# Using yarn 5yarn add exec-limiter
:bulb: ProTip: You can install the cli version of this module by running npm install --global exec-limiter-cli
(or yarn global add exec-limiter-cli
).
1// Dependencies 2var ExecLimiter = require("exec-limiter"); 3 4// Constants 5const COMMAND = "sleep 5; date;"; 6 7// Create an instance of exec limiter 8var el = new ExecLimiter(2); 9 10// #1 11el.add("sleep 5", function (err) { 12 console.log(err || "Waited 5 seconds for the first time."); 13}); 14 15// #2 16el.add("sleep", ["7"], function (err) { 17 console.log(err || "Waited another 7 seconds but probably I was ran in parallel with the other process."); 18}); 19 20// #3 21el.add("sleep 5", function (err) { 22 console.log(err || "I was ran in parallel with the second process and finished fine."); 23}); 24 25// #4 26el.add("ls", ["-l"], { ignoreStdout: false }, function (err, stdout) { 27 console.log(err || "The spawned 'ls -l' returned:\n" + stdout); 28}); 29 30// These will be executed like below: 31// 32// Timeline: 0-1-2-3-4-5-6-7-8-9-10-11 33// 34// #1: ========== 35// #2: ============== 36// #3: ============ 37// #4: == 38// 39// Notice how they run in parallel, but not more than 2 in the same time.
There are few ways to get help:
ExecLimiter(limit)
Creates a new instance of ExecLimiter
.
limit
: The limit of commands to run same time.ExecLimiter
instance.add(command, args, options, callback)
Adds a new command to run in the buffer.
Usage:
1el.add(command, fn); // exec 2el.add(command, args, fn); // spawn 3el.add(command, options, fn); // exec 4el.add(command, args, options, fn); // spawn
command
: The command to run as string.args
: The command arguments as array of strings (optional).options
: The options passed to the spawn/exec function, but extended with the following fields:ignoreStdout
(Boolean): If false
, then the stdout output will be stored ant called back.callback
: The callback function.ExecLimiter
instance.Have an idea? Found a bug? See how to contribute.
I open-source almost everything I can, and I try to reply to everyone needing help using these projects. Obviously, this takes time. You can integrate and use these projects in your applications for free! You can even change the source code and redistribute (even resell it).
However, if you get some profit from this or just want to encourage me to continue creating stuff, there are few ways you can do it:
Starring and sharing the projects you like :rocket:
—I love books! I will remember you after years if you buy me one. :grin: :book:
—You can make one-time donations via PayPal. I'll probably buy a
coffee tea. :tea:
—Set up a recurring monthly donation and you will get interesting news about what I'm doing (things that I don't share with everyone).
Bitcoin—You can send me bitcoins at this address (or scanning the code below): 1P9BRsmazNQcuyTxEqveUsnf5CERdq35V6
Thanks! :heart:
If you are using this library in one of your projects, add it in this list. :sparkles:
@isysd/gpm
angularvezba
engine-tools
exec-limiter-cli
git-stat
gpm
gry
markdownalint-cli2
npmreserve
tools_may_24
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 0/16 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More