Collection

Collection

new Collection()

Source:

An extended Map with utility methods.

Methods

filter(func, thisArgopt) → {Collection}

Source:

Filters cache by function.
Same as Array#filter.

Parameters:
Name Type Attributes Description
func function

Function to test.

thisArg any <optional>

The context for the function.

Returns:
Type
Collection

find(propOrFunc, valueopt) → {any}

Source:

Finds first matching value by property or function.
Same as Array#find.

Parameters:
Name Type Attributes Description
propOrFunc string | function

Property or function to test.

value any <optional>

Value to find.

Returns:
Type
any

map(func, thisArgopt) → {Array.<any>}

Source:

Maps cache by function.
Same as Array#map.

Parameters:
Name Type Attributes Description
func function

Function to use.

thisArg any <optional>

The context for the function.

Returns:
Type
Array.<any>