Wait for multiple promises to be resolved
Server:
$ npm install then-all
Client:
$ component install then/all
var all = require('all');
all(get('foo'), get('bar'))
.then(function (arr) {
var foo = arr[0];
var bar = arr[1];
});
all([get('foo'), get('bar')])
.then(function (arr) {
var foo = arr[0];
var bar = arr[1];
});
MIT