can-queues
Version:
A light weight JavaScript task queue
18 lines (12 loc) • 625 B
Markdown
function} can-queues.Queue Queue
can-queues/types
can-queues.Queue.prototype prototype
A basic FIFO queue that you can `enqueue` tasks into and `flush` enqueued tasks.
`new Queue(name [, callbacks])`
Creates a queue instance.
{String} [name] The name of the queue used for logging.
{Object} [callbacks] Optional. An object containing callbacks `onFirstTask` and/or `onComplete`.
- `onFirstTask` - is called when the first task is added to an empty queue
- `onComplete` - is called when the queue is empty.
{Object} An instance of `Queue`.
{