transform
v4.17.11arrow_drop_downv4.17.11
STATUS
Passing
DOWNLOADS
10
LICENSE
MIT
VISIBILITY
Public
PUBLISHED
10 months ago
SIZE
7 KB
An alternative to `_
1 contributor
Like
Use transform in your project ?
Copied
npm i @bit/lodash.lodash.transform
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.dev
Component Example
React
React
Vue
Angular
React Native
Add dependency... help_outline
Just
and packages in Bit or NPM to the example. any of the 1 million componentstoggle layout
modifieddraft
chevron_left
chevron_right
transform (
object:
Object
,iteratee:
Function?
,accumulator:
) : *?
*
An alternative to _.reduce
; this method 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 object with the same [[Prototype]]
will be used. The
iteratee is invoked with four arguments: (accumulator, value, key, object).
Iteratee functions may exit iteration early by explicitly returning false
.
Example
Arguments
object:
Object
The object to iterate over.
iteratee:
Function?
The function invoked per iteration.
accumulator:
*?
The custom accumulator value.
Returns
*
Returns the accumulated value.