Promise.all isn't always available at the moment (lie doesn't include it by
default)
On Feb 23, 2014 7:29 AM, "Tomasz Ko³odziejski" <notifications@github.com>
wrote:

> In lib/adapters/idb.js:
>
> > +        var subOpts = utils.extend(true, {}, opts);
> > +        subOpts.keys_request = true;
> > +        subOpts.key = key;
> > +        delete subOpts.keys;
> > +        delete subOpts.skip;
> > +        delete subOpts.limit;
> > +
> > +        allDocsNormalQuery(totalRows, subOpts, function (err, res) {
> > +          resultsToCollate.push({err : err, res : res, key : key});
> > +          if (resultsToCollate.length === keys.length) {
> > +            // all done, time to collate
> > +            var keysToResults = {};
> > +            for (var i = 0; i < resultsToCollate.length; i++) {
> > +              var result = resultsToCollate[i];
> > +              if (result.err) {
> > +                utils.call(callback, err);
>
> Promise-all will do this for you.
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/daleharvey/pouchdb/pull/1340/files#r9975540>
> .
>