Description

Make a promise that fulfils when every item in the array fulfils, and rejects if (and when) any item rejects. Each array item is passed to calli.resolve, so the array can be a mixture of promise-like objects and other objects. The fulfilment value is an array (in order) of fulfilment values. The rejection value is the first rejection value.

Signature


calli.all(arrayOfPromises)
Parameter Description
arrayOfPromises Array of promises, thenables, and/or results

Example


calli.all([img1.ready(), img2.ready()]).then(function(arrayOfResults) {
  // all loaded
}, function() {
  // one or more failed
});