A lightweight JavaScript task queue library (v1.3.2) for managing asynchronous task execution with priority and batching. Part of the CanJS ecosystem, it provides simple queue APIs for deferring and ordering callbacks, with support for dynamic priority and concurrency control. Stable, infrequent releases, suitable for applications needing structured task scheduling without heavy dependencies. Differentiated by its minimal footprint and integration with CanJS observables.
npm install can-queuesNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows importing the default export, enqueuing tasks with and without priority, and creating a custom queue instance.
Use import { enqueue, Queue } from 'can-queues' if you need specific members.await queues.enqueue(task) or attach .catch() to the returned promise.
Call queue.run() after enqueuing tasks to execute them.
Replace queue.dequeue(task) with queue.remove(task).
Use import queues from 'can-queues' then call queues.enqueue, or import { enqueue } directly.Use import statements instead of require().
Ensure tasks do not re-enqueue themselves indefinitely or use a depth limit.
Increase max size via options: new Queue({ maxSize: 2048 }) or remove completed tasks.No dependency data recorded yet.