ReadonlypathPath string representing the location of this cursor within the document (e.g. "$.user.name").
Returns true if this document cursor points to a scalar leaf node (spec §2.1).
The scalar value at this leaf node (spec §2.2). Throws DocumentError if this is an internal node.
Append an edge (label, value). A repeated label is how an array
grows. Returns this for chaining.
A cursor to the single child under label (editable if internal).
Returns the number of edges with the specified label.
Returns the ordered list of [label, Doc] child edges (spec §2.1). Throws DocumentError if this is a leaf node.
Tests structural equivalence against another Doc or plain JS value (spec §2.3).
Returns all child Doc cursors for edges with the specified label.
Returns the single child Doc cursor for label. Throws DocumentError if there are 0 or >1 matching edges.
Returns the deduplicated list of child edge labels in first-occurrence order.
Replace all edges under label with a single new edge (positioned at
the first old occurrence); set = remove + add.
A JSON-shaped projection: same-label edges grouped into an array.
A label seen once stays a single value; a label seen more than once
becomes an array (the schema-less fallback of the count-1 rule, see
docs/design/model.md §9(1)).
Human-readable string representation of this document node.
Staticof
A guarded handle on a Document node (a leaf value or an edge list).