filter.nodes.range
range(spec: RangeSpec): FilterHandle<RangeSpec>Numeric range filter on a node property.
Hides nodes whose property value falls outside [min, max]. Omitted bounds default to -Infinity / +Infinity. on restricts the filter to a subset of categories (default = all).
spec.property | string | Node property name to filter on. |
spec.min | number | Lower bound (inclusive). Default: -Infinity. |
spec.max | number | Upper bound (inclusive). Default: +Infinity. |
spec.on | string | string[] | '*' | Restrict to a subset of node categories. Default: '*' (all). |
spec.includeNull | boolean | Keep nodes missing the property. Default: true. |
spec.invert | boolean | Invert pass/fail. Default: false. |
spec.id | string | Override the auto-generated handle id. |
Returns: FilterHandle<RangeSpec>
Example
const adults = api.filter.nodes.range({
property: "age",
min: 18,
on: "Person",
});
// later — tighten the lower bound
adults.update({ min: 21 });
// remove
adults.remove();