List all things in the db
@param {object} [options]
@param {string} [options.prefix]
@param {boolean} [options.values]
@param {function|array} [options.transforms]
@returns {function}
516599
function list(options) {
  return function (req, res) {
    let list,
      listOptions = _.assign({
        prefix: req.uri,
        values: false
      }, options);

    list = db.list(listOptions);

    res.set('Content-Type', 'application/json');
    list.pipe(res);
  };
}
898471
public List<Entity> query(Query query, FetchOptions options) {
		return datastore.prepare(query).asList(options);
	}
314528
function mapAsList(arr, iter) {
    return reduce(arr, function(prev, entry, i) {
        return Q(iter(entry, i))
        .then(function(out) {
            prev.push(out);
            return prev;
        });
    }, []);
}
582525
def get_all(options = {})
      custom_params = options[:dc] ? use_named_parameter('dc', options[:dc]) : nil
      ret = send_get_request(@conn, ['/v1/catalog/services'], options, custom_params)
      OpenStruct.new JSON.parse(ret.body)
    end
878123
function traverse (node, options) {
  if (!node) {
    return ''
  }

  switch (node.type) {
    case 'unary_expr':
    case 'binary_expr':
      return handleExpr(node, options)
    case 'function':
      return handleFunction(node, options)
    case 'expr_list':
      return handleExprList(node, options)
    case 'column_ref':
      return handleColumn(node, options)
    case 'string':
    case 'number':
    case 'null':
    case 'bool':
      return handleValue(node, options)
    case 'timestamp':
      return handleTimestampValue(node, options)
    default:
      throw new Error('Unrecognized AST node: \n' + JSON.stringify(node, null, 2))
  }
}
709560
function( db, prefix ) {
		if (!prefix) prefix="";
		// Import into an easy-to-process format
		var keys = Object.keys(db), k, v;
		for (var i=0; i<keys.length; ++i) {
			k = keys[i]; v = db[k];
			if (!db.hasOwnProperty(k)) continue;

			this.dbTags.push( prefix+k );
			this.dbObjects.push( db[k] );

			// Define the XRef property for faster lookup of the key
			Object.defineProperty(
				v, "__xref__", {
					enumerable: false,
					value: k,
				}
			);

		}
		// Keep reference of database
		this.database = db;
	}
1338503
function findInternalPrefixes(property, noAutofill) {
		var result = [];
		var prefixes = findVendorPrefixes(property);
		
		if (prefixes) {
			var prefixMap = {};
			Object.keys(vendorPrefixes).forEach(function(key) {
				prefixMap[vendorPrefixes[key].prefix] = key;
			});

			result = prefixes.map(function(prefix) {
				return prefixMap[prefix];
			});
		}
		
		if (!result.length && !noAutofill) {
			// add all non-obsolete prefixes
			Object.keys(vendorPrefixes).forEach(function(prefix) {
				if (!vendorPrefixes[prefix].obsolete) {
					result.push(prefix);
				}
			});
		}
		
		return result;
	}
397778
function misc (options) {
  options.hash.scope = undefined
  options.hash['!kind'] = /module|constructor|external/
  options.hash['!isExported'] = true
  return handlebars.helpers.each(_identifiers(options), options)
}
588679
function (values, schema, options, callback) {
    var newValues = {}
        , errors = []
        , modelList = find(schema)
        , val;

    for (var model in modelList) {
        if (_.isArray(modelList[model])) {

            if (values === undefined) {
                val = undefined;
            }
            else {
                val = values[model];
            }

            // Empty array defined in schema
            if (_.isEmpty(modelList[model])) {
                if (val) {
                    newValues[model] = val;
                }
            }
            else {
                // Set value to empty array if empty given
                if (val == undefined) {
                    if (options && options.partial == true) {
                        // Do nothing
                    }
                    else {
                        newValues[model] = [];
                    }
                }
                else {
                    // Sub model defined in schema
                    for (var thisSubSchema in modelList[model]) {
                        if (_.isArray(val)) {
                            for (var thisValue in val) {

                                // Check if type array or plain array
                                if (typeof val[thisValue] == "object") {
                                    modelCompare(val[thisValue], modelList[model][thisSubSchema], options, function (err, data) {
                                        if (err) {
                                            errors = _.union(errors, err);
                                        }
                                        if (data !== null) {
                                            if (!newValues[model]) {
                                                newValues[model] = [];
                                            }
                                            newValues[model][thisValue] = data;
                                        }
                                    });
                                }
                                else {
                                    rulesMatch(thisValue, val[thisValue], modelList[model][thisSubSchema], options, function (err, data) {
                                        if (err) {
                                            errors.push(err);
                                        }
                                        if (data !== undefined) {
                                            if (!newValues[model]) {
                                                newValues[model] = [];
                                            }
                                            newValues[model][thisValue] = data;
                                        }
                                    });
                                }
                            }
                        }
                        else {
                            modelCompare(val, modelList[model][thisSubSchema], options, function (err, data) {
                                if (err) {
                                    errors = _.union(errors, err);
                                }
                                if (data !== null) {
                                    newValues[model] = data;
                                }
                            });
                        }
                    }
                }
            }
        } else {
            // Check for definition of {} in model to allow any data for this node without validation
            if (_.isEmpty(modelList[model])) {
                for (var index in values) {
                    var filter = new RegExp("^" + model);
                    if (index.match(filter)) {
                        newValues[index] = values[index];
                    }
                }
            }
            else {
                if (values === undefined) {
                    val = undefined;
                }
                else {
                    val = values[model];
                }

                rulesMatch(model, val, modelList[model], options, function (err, data) {
                    if (err) {
                        errors.push(err);
                    }
                    if (data !== undefined) {
                        newValues[model] = data;
                    }
                });
            }
        }
    }

    if (_.isEmpty(errors)) {
        errors = null;
    }
    else {
        errors = {name: 'ValidationError', err: errors};
    }
    if (_.isEmpty(newValues)) {
        newValues = null;
    }
    callback(errors, newValues);
}
274394
function listRecords(options) {
    return getZone(options.domain).then(function (zone) {
      return self.cloudflareClient.findRecord(zone.id, {page: 1, per_page: self.perPage})
        .then(function (response) {
          let promises = [Promise.resolve(response)];
          for (let i = 2; i <= response.data['result_info']['total_pages']; i++) {
            promises.push(self.cloudflareClient.findRecord(zone.id, {page: i, per_page: self.perPage}));
          }
          return Promise.all(promises);
        });
    }).then(function (responses) {
      let rows = [];
      _.each(responses, function (response) {
        _.each(response.data.result, function (item) {
          item.ttl = (item.ttl === 1) ? 'Auto' : item.ttl;
          rows.push(item);
        });
      });
      return new Result(rows);
    });
  }
923492
function findAll (state, prefix, filter) {
  var options = {
    include_docs: true
  }

  if (prefix) {
    options.startkey = prefix
    options.endkey = prefix + '\uffff'
  }

  return state.db.allDocs(options)

  .then(function (res) {
    var objects = res.rows
      .filter(isntDesignDoc)
      .map(function (row) {
        return row.doc
      })

    return typeof filter === 'function'
      ? objects.filter(filter)
      : objects
  })
}
1035195
async function getAll(options) {
    const data = {};
    const keys = filterPaths(await module.exports.keys(), options);

    for (let key of keys) {
      data[key] = await module.exports.get(key, {
        before: options.before,
        after: options.after,
      });
    }

    await Promise.all(keys);

    return data;
  }
1088704
function TableFormatter(options) {
  const table = new Table(options);
  this.format = format;
  function format(result, formatOptions) {
    let data = [];
    _.each(result, function (item) {
      data.push(_.values(_.pick(item, options.values)));
    });
    if (formatOptions.format === 'csv') {
     _.each(data, function(row) {
       console.log(row.join(','));
     });
    } else if ( formatOptions.format === 'json') {
      console.log(JSON.stringify(result));
    } else {
      table.push.apply(table, data);
      console.log(table.toString());
    }
  }
}
440162
def list(limit = nil, cursor = nil)
      qs = {}
      qs[:limit] = limit if limit
      qs[:cursor] = cursor if cursor

      api.get('', qs)
    end
889983
function _identifiers (options) {
  var query = {}

  for (var prop in options.hash) {
    if (/^-/.test(prop)) {
      query[prop.replace(/^-/, '!')] = options.hash[prop]
    } else if (/^_/.test(prop)) {
      query[prop.replace(/^_/, '')] = new RegExp(options.hash[prop])
    } else {
      query[prop] = options.hash[prop]
    }
  }
  return arrayify(options.data.root).filter(where(query)).filter(function (doclet) {
    return !doclet.ignore && (state.options.private ? true : doclet.access !== 'private')
  })
}
1121143
function (qs) {
        var items = qs.split('&');
        var options = {};
        items = items.filter(function (item) {
            return item.match(/^[\w_-]+=?$|^[\w_-]+=[^=]+$/);
        }).forEach(function (item) {
            var kv = item.split('=');
            var value = kv[1];
            if (value === undefined || value === '') {
                value = true;
            }
            else if (value.toLowerCase() === 'false') {
                value = false;
            }
            options[kv[0]] = value;
        });

        return options;
    }
375360
function listResources(plugins, resources) {
    return plugins.reduce(function(result, plugin) {
        var npmId           = plugin.getNpmID();
        var pluginResources = resources.get(plugin.getName());

        PLUGIN_RESOURCES.forEach(function(resourceType) {
            var assets = pluginResources.get(resourceType);
            if (!assets) return;

            var list = result.get(resourceType) || Immutable.List();

            assets = assets.map(function(assetFile) {
                if (LocationUtils.isExternal(assetFile)) {
                    return {
                        url: assetFile
                    };
                } else {
                    return {
                        path: LocationUtils.normalize(path.join(npmId, assetFile))
                    };
                }
            });

            list = list.concat(assets);
            result = result.set(resourceType, list);
        });

        return result;
    }, Immutable.Map());
}