A lightweight JavaScript library for queueing and running promise-based jobs with concurrency control. Version 0.1.1 is the latest stable release, with no established release cadence. It allows developers to limit the number of concurrent operations, such as controlling upload bandwidth by restricting simultaneous HTTP requests. Compared to alternatives like p-limit or bottleneck, ZQueue offers a minimal API surface focused solely on concurrency limits. It is CommonJS and supports TypeScript via type definitions.
npm install zqueueNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a queue with max 3 concurrent jobs and uses it to limit parallel HTTP uploads.
Use ZQueue({ max: ... }) as a function, not new ZQueue().Wrap your job logic with try-catch or implement retry manually inside the callback.
Maintain your own external job tracking if you need to inspect queue state.
Use a more feature-rich library like bottleneck or p-limit if advanced control is needed.
Call ZQueue({ max: 3 }) without 'new'.Attach a catch handler: queue.run(() => promise).catch(err => console.error(err)).
Run 'npm install zqueue' and ensure tsconfig.json includes 'node_modules/@types' or the package ships types.
No dependency data recorded yet.