Class: Collection

Collection

A collection of values with some additional logic in the form of the .filter() method. Used as a generic for PluginCollection and DependencyCollection

Constructor

new Collection(collection)

Initialize a new collection.

Parameters:
Name Type Description
collection Object | Array

Base collection

Source:

Extends

  • Array

Methods

filter(predicate) → {Array}

Filter the current collection and return a new collection (of the same type) containing items matching the predicate.

Parameters:
Name Type Description
predicate Object | function

Lodash-style predicate

Source:
Returns:
Type
Array