{"id":46004,"library":"quu","title":"quu","description":"quu is a lightweight concurrent function queue for Node.js (v0.5.0, latest stable). It allows specifying maximum concurrency and optional wait mode before starting tasks. Tasks are added via push() and executed with run(), supporting both callback and promise APIs. Differentiators include minimal configuration, zero dependencies, and simple interface compared to heavier queue libraries like Bull or async.queue.","status":"active","version":"0.5.0","language":"javascript","source_language":"en","source_url":"https://github.com/yetzt/node-quu","tags":["javascript","queue","async","asynchronous","job","task","flow","concurrency","concurrent"],"install":[{"cmd":"npm install quu","lang":"bash","label":"npm"},{"cmd":"yarn add quu","lang":"bash","label":"yarn"},{"cmd":"pnpm add quu","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Package is CJS-only; ESM import not supported.","wrong":"import quu from 'quu';","symbol":"quu","correct":"const quu = require('quu');"},{"note":"Default export is a function, not named.","wrong":"const { quu } = require('quu');","symbol":"default","correct":"const quu = require('quu');"},{"note":"No TypeScript types shipped; use JSDoc or ambient declarations.","symbol":"QuuQueue type","correct":"/** @typedef {import('quu')} QuuQueue */"}],"quickstart":{"code":"const quu = require('quu');\n\nconst q = quu(2); // max 2 concurrent tasks\n\nq.push(done => {\n  setTimeout(() => {\n    done();\n  }, 1000);\n});\n\nq.push(done => {\n  setTimeout(() => {\n    done(new Error('task failed'));\n  }, 500);\n});\n\nq.push(done => {\n  setTimeout(() => {\n    done();\n  }, 200);\n});\n\nq.run((errors, completed) => {\n  console.log('completed:', completed);\n  if (errors) errors.forEach(e => console.error(e.message));\n});","lang":"javascript","description":"Create a queue with concurrency 2, push three tasks (one failing), then run with callback."},"warnings":[{"fix":"Pass true as second argument: quu(concurrency, true) to defer execution until run() is called.","message":"If wait mode is false (default), tasks start executing immediately upon push() even before run() is called. This can lead to unexpected behavior if tasks depend on external state set after push().","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Always call done(err) with an Error object or null/undefined. In callback, filter errors: errors.filter(Boolean).forEach(...)","message":"Errors collected from tasks are passed as an array to run() callback/promise. The array may contain undefined or non-Error values if task calls done() without argument.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Create a new queue instance for each batch, or push new tasks and call run() again (but only the first call will execute).","message":"run() can only be called once per batch. Calling run() again after completion will have no effect.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"search_vec":"'ad':28 'allow':15 'api':40 'async':61 'async.queue':58 'asynchron':62 'bull':56 'callback':37 'compar':50 'concurr':6,18,66,67 'configur':44 'depend':46 'differenti':41 'execut':32 'flow':65 'function':7 'heavier':52 'includ':42 'interfac':49 'javascript':59 'job':63 'latest':12 'librari':54 'lightweight':5 'like':55 'maximum':17 'minim':43 'mode':22 'node.js':10 'option':20 'promis':39 'push':30 'queue':8,53,60 'quu':1,2 'run':34 'simpl':48 'specifi':16 'stabl':13 'start':24 'support':35 'task':25,26,64 'v0.5.0':11 'via':29 'wait':21 'zero':45","created_at":"2026-06-07T12:57:48.432952+00:00","updated_at":"2026-06-07T12:57:48.432952+00:00","problems":[{"fix":"Use require('quu') instead.","cause":"Using ES6 import (import quu from 'quu') which is not supported.","error":"TypeError: quu is not a function"},{"fix":"Ensure task function receives done callback: q.push(done => { ... done(); });","cause":"Incorrect usage of task function signature; expecting done parameter but code may have omitted it.","error":"ReferenceError: done is not defined"},{"fix":"Push all tasks before calling run(), or use wait mode: const q = quu(5, true);","cause":"run() called with wait=false (default) and push() after run()","error":"Task not executed"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/yetzt/node-quu#readme","github":"https://github.com/yetzt/node-quu","docs":null,"changelog":null,"pypi":null,"npm":"quu","openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}