nodes

nodes.where

where(filter: NodeFilter): NodeQuery

Begin a chainable query that filters nodes by the given predicate.

Returns a NodeQuery builder; call .toArray() to materialize results or .remove() / .hide() etc. to act on the matched set directly. Not undoable until a terminal mutation method is called on the returned query.

filterNodeFilterA predicate or filter descriptor applied to all nodes.

Returns: NodeQuery

Example

const people = api.nodes.where({ category: "Person" }).toArray();
await api.nodes.where({ category: "Ghost" }).remove();