toPaths
toPaths(
obj,parentKey?,schema?):string[]
Defined in: packages/store-kit/src/objects/paths.ts:18
Recursively generates the paths for all keys in an object or array, formatted as dot notation.
When a CompiledSchema is supplied, descent stops at any subtree the
schema marks x-storekit-box: "whole" — the box-root path is returned as
a leaf so callers pack/unpack the entire subtree as a single ARC4 value.
Without a schema, the original per-leaf behavior is preserved.
Parameters
obj
unknown
The object or array for which to generate key paths.
parentKey?
string
The key or path of the parent object, used to build the complete key paths.
schema?
Optional compiled schema for whole-subtree detection.
null | CompiledSchema
Returns
string[]
An array of strings representing the paths of the keys in dot notation.