@univerjs/core v0.4.2 • Docs
Function: set()
set(object, path, value)
function set<T>(
object,
path,
value): T
Sets the value at path of object. If a portion of path doesn’t exist it’s created. Arrays are created for missing index properties while objects are created for all other missing properties. Use _.setWith to customize path creation.
Type Parameters
Type Parameter |
---|
T extends object |
Parameters
Parameter | Type | Description |
---|---|---|
object | T | The object to modify. |
path | PropertyPath | The path of the property to set. |
value | any | The value to set. |
Returns
T
Returns object.
Defined in
submodules/univer/node_modules/.pnpm/@types+lodash@4.17.7/node_modules/@types/lodash/common/object.d.ts:2263
set(object, path, value)
function set<TResult>(
object,
path,
value): TResult
Type Parameters
Type Parameter |
---|
TResult |
Parameters
Parameter | Type |
---|---|
object | object |
path | PropertyPath |
value | any |
Returns
TResult
See
_.set
Defined in
submodules/univer/node_modules/.pnpm/@types+lodash@4.17.7/node_modules/@types/lodash/common/object.d.ts:2267