Skip to content

Function: setDotValues()

ts
function 
setDotValues
(
obj
,
path
,
value
): void;

Defined in: packages/parser/src/utils.ts:96

Sets a value at a nested path in an object, creating intermediate objects as needed. Does NOT apply type conversion - value is set as-is. Overwrites existing values.

Parameters

ParameterTypeDescription

obj

any

The target object

path

string

Dot-separated path (e.g., "foo.bar.baz")

value

any

The value to set (used as-is, no type conversion)

Returns

void

Released under the MIT license