code: function doBulkGetShim() {
        // avoid "url too long error" by splitting up into multiple requests
        var batchSize = MAX_SIMULTANEOUS_REVS;
        var numBatches = Math.ceil(opts.docs.length / batchSize);
        var numDone = 0;
        var results = new Array(numBatches);
  
        function onResult(batchNum) {
          return function (err, res) {
            // err is impossible because shim returns a list of errs in that case
            results[batchNum] = res.results;
            if (++numDone === numBatches) {
              callback(null, {results: pouchdbUtils.flatten(results)});
            }
          };
        }
  
        for (var i = 0; i < numBatches; i++) {
          var subOpts = pouchdbUtils.pick(opts, ['revs', 'attachments', 'latest']);
          subOpts.ajax = ajaxOpts;
          subOpts.docs = opts.docs.slice(i * batchSize,
            Math.min(opts.docs.length, (i + 1) * batchSize));
          pouchdbUtils.bulkGetShim(self, subOpts, onResult(i));
        }
      }
docs: /* istanbul ignore next