{"id":44181,"library":"CBQueue","title":"CBQueue","description":"Generic callback queue using promises for managing async task execution with priority support. Current version 0.0.11 is early-stage with minimal adoption. Provides a lightweight alternative to full-featured async queues like Bull or Bee-Queue, but lacks persistence, monitoring, and production hardening. Ships TypeScript types. Low release cadence.","status":"active","version":"0.0.11","language":"javascript","source_language":"en","source_url":"https://github.com/DxCx/CBQueue","tags":["javascript","callback","promise","queue","priority","typescript"],"install":[{"cmd":"npm install CBQueue","lang":"bash","label":"npm"},{"cmd":"yarn add CBQueue","lang":"bash","label":"yarn"},{"cmd":"pnpm add CBQueue","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Named export only; no default export.","wrong":"import CBQueue from 'cbqueue'","symbol":"CBQueue","correct":"import { CBQueue } from 'cbqueue'"},{"note":"Priority is an enum, not a string union.","wrong":"import { PriorityEnum } from 'cbqueue'","symbol":"Priority","correct":"import { Priority } from 'cbqueue'"},{"note":"Task is a TypeScript type; use import type for type-only imports.","wrong":"import { Task } from 'cbqueue'","symbol":"Task","correct":"import type { Task } from 'cbqueue'"}],"quickstart":{"code":"import { CBQueue, Priority } from 'cbqueue';\n\nconst queue = new CBQueue();\n\nconst task1 = () => Promise.resolve('Task 1 done');\nconst task2 = () => Promise.resolve('Task 2 done');\n\nqueue.enqueue(task1, Priority.NORMAL);\nqueue.enqueue(task2, Priority.HIGH);\n\nqueue.process(async (task) => {\n  const result = await task();\n  console.log(result);\n});","lang":"typescript","description":"Creates a queue, enqueues two tasks with different priorities, and processes them sequentially."},"warnings":[{"fix":"Call queue.process(handler) after enqueuing tasks.","message":"CBQueue does not automatically process tasks; you must call .process() explicitly.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Enqueue all tasks before calling .process(), or use a separate queue instance.","message":"Enqueuing a task while processing is active may cause tasks to be processed out of order or skipped.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Do not rely on priority for critical ordering; use a dedicated priority queue library.","message":"Priority levels are only advisory; the queue does not guarantee strict priority order.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"search_vec":"'0.0.11':17 'adopt':24 'altern':28 'async':9,33 'bee':39 'bee-queu':38 'bull':36 'cadenc':53 'callback':3,55 'cbqueue':1 'current':15 'earli':20 'early-stag':19 'execut':11 'featur':32 'full':31 'full-featur':30 'generic':2 'harden':47 'javascript':54 'lack':42 'lightweight':27 'like':35 'low':51 'manag':8 'minim':23 'monitor':44 'persist':43 'prioriti':13,58 'product':46 'promis':6,56 'provid':25 'queue':4,34,40,57 'releas':52 'ship':48 'stage':21 'support':14 'task':10 'type':50 'typescript':49,59 'use':5 'version':16","created_at":"2026-06-07T12:48:51.239726+00:00","updated_at":"2026-06-07T12:48:51.239726+00:00","problems":[{"fix":"Ensure you import CBQueue as a named export: import { CBQueue } from 'cbqueue'","cause":"Calling .process() on a non-existent method; likely due to wrong import or version mismatch.","error":"TypeError: queue.process is not a function"},{"fix":"Ensure each task returns a Promise (or async function).","cause":"Task function did not return a promise.","error":"Uncaught TypeError: Cannot read properties of undefined (reading 'then')"}],"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/DxCx/CBQueue#readme","github":"https://github.com/DxCx/CBQueue","docs":null,"changelog":null,"pypi":null,"npm":"CBQueue","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"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}}