ixfx
    Preparing search index...
    • Applies predicate to root and all its child nodes, returning the node value for predicate yields true. Use find to filter by nodes rather than values

      const n = findByValue(root, (v) => v.name === 'Bob');
      

      Type Parameters

      • T

      Parameters

      • root: TraversableTree<T>
      • predicate: (nodeValue: T) => boolean
      • order: "depth" | "breadth" = ...

        Iterate children by breadth or depth. Default 'breadth'

      Returns undefined | TraversableTree<T>