tmpvar-future-wait

1.0.1 • Public • Published

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

license

MIT

Package Sidebar

Install

npm i tmpvar-future-wait

Weekly Downloads

0

Version

1.0.1

License

MIT

Last publish

Collaborators

  • tmpvar