mid.js
A lightweight flow control for Node and Browsers. Similar to async.js but more than enjoyable API :).
Installation
npm install mid.js --save
Examples
Didn't use any flow control:
use mid.js
var mid =
async
var mid =
in loop:
var mid = var masync = forvar i = 0; i < 2; i++ masync masync
API
mid(['async'|'sync'])
set run use
functions as async
or sync
use([function(...args, next)])
process functions for async
or sync
.
The behavior like Express.js middleware.
done([function])
invoking when ecah processes done.
once([function])
invoking once when all async process done.