Skip to content

Documentation / @super-line/core / removeAtPath

Function: removeAtPath()

removeAtPath(root, path): unknown

Defined in: packages/core/src/store.ts:20

Return a structural clone of root with the value at path removed — the surgical-delete primitive shared by every Store's replica halves. Clones only along the path (not a deep clone): fed to a diff-and-patch set, only the removed key is rewritten, so concurrent edits to sibling keys still merge. Never mutates root (the live snapshot must stay intact). path === [] returns root unchanged.

Parameters

root

unknown

path

(string | number)[]

Returns

unknown

Released under the MIT License.