return the entire store as an Array
@param  {Function} done The callback when done
187457
function(done) {
      var self = this;
      this._getCollection(function(err) {
        if(err) {
          done(err);
        }
        self._collection.find({}).toArray(function(err, docs) {
          self._db.close();
          if(err) {
            done(err);
          } else {
            done(null, docs);
          }
        });
      });
    }
784047
function getIndexes(done, results) {
  var client = results.client;
  var ns = mongodbNS(results.namespace);
  client
    .db(ns.database)
    .collection(ns.collection)
    .indexes(function(err, indexes) {
      if (err) {
        done(err);
      }
      // add ns field to each index
      _.each(indexes, function(idx) {
        idx.ns = ns.ns;
      });
      done(null, indexes);
    });
}
997055
function toArray() {
  const arr = [];
  for (let i = 0; i < this.length; i += 1) {
    arr.push(this[i]);
  }
  return arr;
}
1128370
function (done) {
      Client.listByTrusted('true', {
        select: [
          '_id',
          'client_name',
          'client_uri',
          'application_type',
          'logo_uri',
          'trusted',
          'scopes',
          'created',
          'modified'
        ]
      }, function (err, clients) {
        if (err) { return done(err) }
        done(null, clients)
      })
    }
318700
function(query) {
        var items = [];
        for (var i = 0; i < this._store.length; i++) {
            items.push(JSON.parse(this._store.getItem(this._store.key(i))));
        }
        return resolvedPromise(_.query(items, query));
    }
1058412
function all(){
  var len = storage.length;
  var ret = {};
  var key;

  while (0 <= --len) {
    key = storage.key(len);
    ret[key] = get(key);
  }

  return ret;
}
84912
function(req, res) {
            var stores = [];
            for (key in onmStoreDictionary) {
                stores.push({
                    dataModel: onmStoreDictionary[key].model.jsonTag,
                    storeKey: key
                });
            }
            res.send(200, stores);
        }
240479
function get(key, store = getDefaultStore()) {
  let req
  return store[IDBStore]('readonly', store => {
    req = store.get(key)
  }).then(() => req.result)
}
257630
function(callback) {
                var _this = this

                var initStorage = function() {
                    var obj = JSON.stringify([])
                    var _set = {}
                    _set[_this.key] = obj
                    storage.set(_set)

                    obj = JSON.parse(obj)

                    return obj
                }

                storage.get(this.key, function(items) {
                    var obj
                    if (Object.keys(items).length > 0) {
                        for (itemKey in items) {
                            obj = items[itemKey]
                            if (obj) {
                                obj = JSON.parse(obj)
                            }

                            if (obj === null || typeof obj === 'undefined') {
                                obj = initStorage()
                            } 
                            
                            if (callback) {
                                callback(obj)
                            }
                        }
                    } else {
                        obj = initStorage()
                        callback(obj)
                    }
                })
            }
1101364
function () {
    var items = [];
    for (var i = 0, length = this.getFilteredItemCount(); i < length; i++) {
      items.push(this.items[this.convertViewIndexToModel(i)]);
    }
    return items;
  }
644474
function(done) {
  return {
    success: function(res) {
      done(null, res);
    },
    error: function(res, err) {
      done(err);
    }
  };
}
612003
function getStats(results, done) {
  const databases = results.databases;

  const keys = ['document_count', 'storage_size', 'index_count', 'index_size'];
  const stats = {};
  keys.map(function(k) {
    stats[k] = 0;
  });
  databases.map(function(db) {
    keys.map(function(k) {
      stats[k] += db[k];
    });
  });
  done(null, stats);
}
750982
function(items, iterator, done) {
    done = done || function() {};
    var results = [];
    var failure = false;
    var expected = items.length;
    var current = -1;

    function callback(err, result) {
      if (err) return done(err);

      results.push(result);

      if (current == expected) {
        return done(null, results);
      } else {
        next();
      }
    }

    function next() {
      current += 1;

      var item = items[current];
      iterator(item, callback);
    }

    next()
  }
346780
function getAllStoreNames(db) {
    return new Promise$1(function (resolve, reject) {
        db.transaction(function (t) {
            t.executeSql('SELECT name FROM sqlite_master ' + "WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'", [], function (t, results) {
                var storeNames = [];

                for (var i = 0; i < results.rows.length; i++) {
                    storeNames.push(results.rows.item(i).name);
                }

                resolve({
                    db: db,
                    storeNames: storeNames
                });
            }, function (t, error) {
                reject(error);
            });
        }, function (sqlError) {
            reject(sqlError);
        });
    });
}
941772
function() {
        return Promise.try(() => {
            const txn = this.db.transaction(["users"], "readonly");
            const store = txn.objectStore("users");
            return selectQuery(store, undefined, (cursor) => {
                return [cursor.value.userId, cursor.value.event];
            });
        });
    }
597419
def getDone(self, done):
        

        doneItems = self.noteDB['todo'] \
                        .find({"done": done}) \
                        .sort("date", pymongo.DESCENDING)
        IDs = [ii['ID'] for ii in doneItems]
        return IDs
341061
function() {
          if ( !(scope.model instanceof Array) ) {
            scope.model = scope.model ? [ scope.model ] : [];
          }
          return scope.model;
        }