Registry / devops / qbox
library0.1.7jsnpmunverified

Qbox is a lightweight queue management library for Node.js, version 0.1.7, with a jQuery-like API for chaining asynchronous operations. It provides a simple way to sequence tasks, handle completion and error callbacks, and control flow with pause/resume and limit features. Compared to full-featured queue libraries like Bull or async.js, Qbox focuses on simplicity and minimal dependencies, suitable for small-scale task orchestration without need for persistence or distributed processing. The package is mature but not actively updated, with sparse releases.

npm install qbox
INSTALL
IMPORT
SIG · QBOX
Q
qbox
devopsjavascriptv0.1.7
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Q
import Q from 'qbox'
const Q = require('qbox')
Default export; CommonJS require works but ESM import is recommended.
Q.Stack
import Q from 'qbox'; const stack = Q.Stack();
const { Stack } = require('qbox')
Stack is a method of the default export, not a named export.
Q.box
import Q from 'qbox'; const box = Q.box();
const box = require('qbox').box()
Access as method on Q, not as property of require.

Creates a queue, adds two tasks, sets a completion handler, and runs the queue.

import Q from 'qbox'; const q = Q(); q.task((next) => { console.log('Task 1'); next(); }); q.task((next) => { console.log('Task 2'); next(); }); q.complete((err) => { if (err) console.error(err); else console.log('All tasks done'); }); q.run();
Debug
Known issues
breakingVersion 0.1.7 changed the default export from a function to a constructor; upgrading may break existing code that used Q() without new.
fix
Update calls from Q() to new Q() or use the static factory Q.box().
affects: <0.1.7
deprecatedThe method Q.run() is deprecated in favor of Q.start() in future versions.
fix
Replace q.run() with q.start().
affects: 0.1.7
gotchaCallbacks passed to task() must call next() or the queue will hang; no automatic timeout is set.
fix
Always invoke next() when the task is complete, even on error (with an error argument).
affects: *
gotchaError handling: errors passed to next() are thrown if no complete callback is provided.
fix
Always attach a complete() handler to catch errors.
affects: *
Errors
Common errors & fixes
TypeError: Q is not a function
Using Q as a function without default import or wrong import style.
fix
Ensure import is correct: import Q from 'qbox' or const Q = require('qbox').default
Error: next() called multiple times
Calling next() more than once in a single task callback.
fix
Guard next() calls with a done flag to prevent double invocation.
RangeError: Maximum call stack size exceeded
Infinite recursion due to tasks adding themselves recursively.
fix
Ensure tasks do not call themselves directly within the task callback; use q.prepend or q.append for new tasks.
Upgrade
Version history
0.1.7latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
packageqbox
qbox — npm install qbox · libregistry