associateDeep()
associateDeep<
T>(obj): <K>(prop) => (val) =>T
Sets the val of prop in obj. Returning a new, deep copy of the object.
Type Parameters
T
T extends object
The type of the input object.
Parameters
obj
T
The object to set the value on.
Returns
<
K>(prop): (val) =>T
Type Parameters
K
K extends string | number | symbol
Parameters
prop
K
Returns
(
val):T
Parameters
val
T[K]
Returns
T
Remarks
pure function
Example
associateDeep(personStore)('address')({
city: 'Austin',
street: '987 Sample St',
});
// {
// // ...,
// city: 'Austin',
// street: '987 Sample St',
// }