henrygd/queue — explained in plain English
Analysis updated 2026-08-10 · repo last pushed 2025-11-20
Limit concurrent API requests to avoid hitting rate limits when fetching data from external services.
Control how many files upload at once when sending batches to cloud storage.
Throttle web scraping tasks so you don't overload a target website or get blocked.
Run a batch of async tasks and collect all results together like Promise.all.
| henrygd/queue | polymarket-trading-kit/sports-trading-bot | nationaldesignstudio/rampart | |
|---|---|---|---|
| Stars | 150 | 150 | 151 |
| Language | TypeScript | TypeScript | TypeScript |
| Last pushed | 2025-11-20 | — | — |
| Maintenance | Quiet | — | — |
| Setup difficulty | easy | — | easy |
| Complexity | 2/5 | — | 3/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
If your app relies on Node's AsyncLocalStorage, you need to import a specific variant of the library instead of the default package.
@henrygd/queue is a tiny JavaScript tool that helps you manage tasks running at the same time. When your app needs to do many things at once, like fetching data from several APIs, this library makes sure it doesn't overwhelm the system by limiting how many tasks can run simultaneously. You create a queue and set a maximum number of concurrent tasks. Then you add your async functions to the queue, and it handles the rest. It only starts as many tasks as your limit allows, holding the rest in line until a slot opens up. You can wait for everything to finish with a single done() call, or use all() to run a batch of tasks and collect their results, similar to how JavaScript's native Promise.all works. This is useful for anyone building apps that interact with external services. For example, if you're scraping data from a website, uploading files to a storage service, or hitting an API that only allows a certain number of requests per second, this library keeps things orderly. It also offers a rate-limiting feature that caps how many tasks can start within a given time window, which is handy when an API enforces strict rate limits. The project's main selling point is its minimal size and speed. The README includes benchmarks across browsers, Node.js, Deno, Bun, and Cloudflare Workers, showing it outperforms similar popular libraries like p-limit and fastq. The base version is under 500 bytes, making it nearly invisible in your app's bundle. It works across all major JavaScript environments. One tradeoff: if your app relies on Node's AsyncLocalStorage feature, you'll need to import a specific variant of the library rather than the default one, since that feature isn't included in the main package to keep it lean.
A tiny JavaScript library that limits how many async tasks run at the same time, preventing overwhelm when doing things like fetching data from multiple APIs or uploading files. Under 500 bytes and works everywhere JavaScript runs.
Mainly TypeScript. The stack also includes TypeScript, Node.js, Deno.
Quiet — no commits in 6-12 months (last push 2025-11-20).
The license terms are not specified in the README, so check the repository for details on how you can use this library.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Don't trust strangers blindly. Verify against the repo.