An alternative to reduce; this function transforms object to a new accumulator object which is the result of running each of its own enumerable string keyed properties thru iteratee, with each invocation potentially mutating the accumulator object. If accumulator is not provided, a new plain object ({}) will be used. Iteratee functions may exit iteration early by explicitly returning false.
Differences from lodash:
the default accumulator will not have any special prototype, it will simply be {}
does not treat sparse arrays as dense
Contribution to minified bundle size, when it is the only function imported:
An alternative to
reduce
; this function transformsobject
to a newaccumulator
object which is the result of running each of its own enumerable string keyed properties thruiteratee
, with each invocation potentially mutating theaccumulator
object. Ifaccumulator
is not provided, a new plain object ({}
) will be used. Iteratee functions may exit iteration early by explicitly returningfalse
.Differences from lodash:
{}
Contribution to minified bundle size, when it is the only function imported: