Skip to content

toolmark-monorepo / @toolmark/core / getPath

Function: getPath() ​

getPath(obj, path): unknown

Defined in: packages/core/src/forms/paths.ts:227

Reads a dot path using own properties only.

Parameters ​

obj ​

unknown

Source value.

path ​

string

Dot path such as address.city or items.0.

Returns ​

unknown

The value, or undefined when absent.

Throws ​

ToolmarkError invalid_path for an empty segment or a prototype key.