Function treeFromArray

  • Creates a tree structure from the given array.

    Type Parameters

    • T extends {
          parent?: T;
      }

    Parameters

    • array: T[]

      The array to create the tree from.

    • comparator: TreeComparator<T>

      The tree nodes comparator.

    Returns undefined | Tree<T>

    the result tree.

Generated using TypeDoc