This module contains utility functions for iterating over elements,
such as `map` and `reduce`.
- Source:
Methods
(static) reduce(callback, initial) → {any}
Iteate over every element in the query with a callback that returns
a given accumulator value. This accumulator is passed through each
element and can be mutated over the course of the function call.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
callback |
elementIterator
|
Function to call on each iteration. |
initial |
any
|
Initial value for the accumulator. |
Returns:
- Type:
-
any
the same value as the initial.