can-queues
Version:
A light weight JavaScript task queue
30 lines (21 loc) • 641 B
Markdown
Queue.prototype.log log
can-queues.Queue.prototype
Logs the tasks
`queue.log( [type] )`
Logs tasks as they are being enqueued and flushed.
The following:
```js
queue.log();
queue.enqueue( console.log, console, [ "say hi" ], {} );
queue.flush();
```
Logs:
<pre>
enqueuing: log ▶ { ... }
running : log ▶ { ... }
say hi</pre>
{String|Boolean} [type=true] Specifies what to log.
- `.log()` - Logs when tasks are enqueued and run.
- `.log(false)` - Turn off logging.
- `.log("flush")` - Log only flushing.
- `.log("enqueue")` - Log on enqueuing.
can-queues.