just.reduce(object, fn, accumulator, thisArg)
Same as Array.prototype.reduce, but for the own enumerable properties of object, and with an extra param (thisArg).
Parameters:
Name | Type | Description |
---|---|---|
object | object | The target object. |
fn | function | The transform function. It's called with the same arguments as the Array.prototype.reduce function. |
accumulator | Any | The initial value for the accumulator. |
thisArg | Any | this argument for fn. |
Returns:
accumulator