projects/utils/tree.ts
Return a new tree containing only nodes whose value matches predicate or have at least one matching descendant. Ancestors of any match are preserved so the path is never broken; branches with zero matches are dropped entirely.
value
predicate
filterTree(nodes, predicate)
CngxTreeNode[]