A super tiny work queue for Node.js (v3.0.0, stable). It guarantees ordered execution, supports nested queues, and runs automatically when jobs are added. Works with async/await and promises. Features a drain hook for completion and optional singletons for shared queues across files. Current version requires Node >=10. Lightweight alternative to async.queue or bull with minimal API surface.
npm install workqNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows creating a queue, adding jobs with callbacks (including nested), async/await, and drain hook.
Use import instead of require(), or downgrade to v2.x if you must use CommonJS.
Switch to ESM import: import workq from 'workq'.
Only call done() when you are finished adding child jobs. Use child queues if needed.
Make sure drain callback is idempotent or guard against multiple invocations.
Use `const workq = require('workq')` for CommonJS or switch to ESM: `import workq from 'workq'`.Use `import workq from 'workq'` or downgrade to v2.x.
Ensure all jobs are added before calling done(), or use child queues for additional nested jobs.
No dependency data recorded yet.