Resolve an array of promises
JavaScript CSS HTML
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
test
.gitignore
.jepso-ci.json
.travis.yml
component.json
index.js
package.json
readme.md

readme.md

Build Status jepso-ci status

then/all

Wait for multiple promises to be resolved

Installation

Server:

$ npm install then-all

Client:

$ component install then/all

API

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];
  });

License

MIT

viewcount