Collection

Collection

new Collection()

Description:
  • An extended Map with utility methods.

Source:

Methods

filter(func, thisArgopt) → {Collection}

Description:
  • Filters cache by function.
    Same as Array#filter.

Source:
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}

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

Source:
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>}

Description:
  • Maps cache by function.
    Same as Array#map.

Source:
Parameters:
Name Type Attributes Description
func function

Function to use.

thisArg any <optional>

The context for the function.

Returns:
Type
Array.<any>