setProp

Function

Sets a deep object property, constructing the property path as necessary

  • setProp(path: string | string[], val: any, obj: any) : void

Parameters

Parameter Type Default Notes
path Required string | string[]

the path to the property we want to set

val Required any

the value we want to set it to

obj Required any

the target object

Returns

void

Function defined in common/src/objects/set-prop.ts:10