tmpvar-future-wait
v1.0.1
Published
wait for an array of tmpvar-futures to complete
Downloads
2
Maintainers
Readme
tmpvar-future-awate
wait for an array of tmpvar-futures to complete
install
npm install tmpvar-future tmpvar-future-wait
use
var future = require('tmpvar-future');
var wait = require('tmpvar-future-wait');
var f1 = future();
var f2 = future();
var f3 = wait(f1, f2)
f3(function(e, r) {
console.log(e); // null
console.log(r); // ['abc', 123]
})
f1(null, 'abc');
f2(null, 123);
see test.js for more examples