filter

filter.nodes

Sugar API for filters that hide individual nodes. Every method constructs an internal filter entry, registers it with the manager, and returns a typed FilterHandle so the caller can later update, invert, or remove the filter without re-issuing the original call.

The hidden node's incident edges are automatically coupled hidden by the manager; you do not need a paired edge filter unless you want to filter edges on their own properties.

Filter ids are caller-supplied (spec.id) or auto-generated (range-1, range-2, …). Re-using an explicit id overwrites the previous entry.

Methods

  • range — numeric range on a property
  • dateRange — date range on a property
  • match — categorical allowlist or regex
  • predicate — custom (node) => boolean escape hatch
  • degree — topology filter by node degree

Common options

Every node filter (except degree, which is uniform-by-design) accepts:

Field Type Default Meaning
on string | string[] | '*' '*' Restrict the filter to a subset of node categories. '*' means all.
includeNull boolean true If true, nodes missing the property are kept; if false, they are hidden.
invert boolean false Invert the filter's pass/fail result. Toggleable via handle.invert().
id string auto Override the auto-generated handle id. Re-using an id overwrites that entry.