Micro Tasking Library
Simple task utility that runs tasks as micro tasks via promises.
Install
NPM
- Use:
require('micro-tasks')
- Install:
npm install --save micro-tasks
Bower
- Use:
require('micro-tasks')
- Install:
bower install micro-tasks
Documentation
Usage
Single micro tasks
// creates a MicroTaskQueue, then passes in some optional data var data = 0; queue = data; // the following functions are added in no specific order // adds a single micro task queue // optional done handler called when all tasks are complete ; queue;
Multiple micro tasks
// creates a MicroTaskQueue, then passes in some optional data var data = 1 queue = ; // adds a batch of micro tasks queue // optional done handler called when all tasks are complete ; queue;
Monitoring single tasks
// create a MonitoredTaskQueue, this example passes in some optional datavar data = 0;var queue = ; // the following functions are added in no specific order // optional beforeEach task handlerqueue// optional afterEach task handler// adds a task with a taskDone callback handler// optional done handler called when all tasks are complete; queue;
Monitoring task batches
var data = 0; // create a MonitoredTaskQueue, this example passes in some optional data var queue = ; // the following functions are added in no specific order // optional beforeEach task handler queue // optional afterEach task handler // adds a batch of tasks with a taskBatchDone callback handler // which is called once the batch of tasks are complete // optional done handler called when all tasks are complete ; queue;
Backers
Maintainers
These amazing people are maintaining this project:
- pflannery (https://github.com/pflannery)
Sponsors
No sponsors yet! Will you be the first?
Contributors
These amazing people have contributed code to this project:
License
Licensed under GNU GPL v3
Copyright © 2015+ pflannery (https://github.com/pflannery)