Like
Install update-with as a package?
Copied
npm i @bit/lodash.lodash.update-with
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.cloud
Component Example modifieddraft
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
No preview available
chevron_left
chevron_right
updateWith (
object:
Object
,path:
(Array | string)
,updater:
Function
,customizer:
) : Function?
Object
This method is like update
except that it accepts customizer
which is
invoked to produce the objects of path
. If customizer
returns undefined
path creation is handled by the method instead. The customizer
is invoked
with three arguments: (nsValue, key, nsObject).
Note: This method mutates object
.
Example
Arguments
object:
Object
The object to modify.
path:
(Array | string)
The path of the property to set.
updater:
Function
The function to produce the updated value.
customizer:
Function?
The function to customize assigned values.
Returns
Object
Returns `object`.