Task runner
Set of methods to synchronize asynchronous operations.
Installation
npm install cjs-runner
Usage
Add to the scope:
var Runner = runner = ;
Create a simple sync task:
runner;
Create a simple async task:
runner;
Create a task with serial subtasks:
runner;
Create a task with parallel subtasks:
runner;
It's possible to use either anonymous or named functions as well:
runner;
Batch tasks creation:
Object;
Execute a task by name:
runner;
Execute a task and handle the result:
runner;
Execute a task as a named or anonymous function:
runner;
Execute task series:
runner;
Execute task chain:
// no result checkrunnerstart; // hook on task completionrunnerstart { console;}; // hook on task completionrunnerstart { if error console; };
Hook on task start/stop events:
runner; runner;
Contribution
If you have any problems or suggestions please open an issue according to the contribution rules.
License
cjs-runner
is released under the MIT License.