ixfx
    Preparing search index...

    Functions

    breadthFirst

    Iterates over the children of root, breadth-first

    childrenLength
    couldAddChild

    Returns true if prospectiveChild can be legally added to parent. False is returned if:

    • parent and prospectiveChild are equal
    • parent already contains prospectiveChild
    • prospectiveChild has parent as its own child
    depthFirst

    Iterates over children of root, depth-first.

    find

    Applies predicate to root and all its child nodes, returning the node where predicate yields true. Use findByValue to find a node by its value

    findAnyChildByValue

    Descends parent, breadth-first, looking for a particular value. Returns undefined if not found.

    findAnyParentByValue
    findByValue

    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

    findChildByValue

    Searches breadth-first for possibleValue under and including parent. maxDepth sets he maximum level to which the tree is searched.

    findParentByValue
    followValue

    Search through children in a path-like manner.

    hasAnyChild

    Returns true if possibleChild is contained within parent tree. That is, it is any sub-child.

    hasAnyChildValue
    hasAnyParent

    Returns true if child is parented at any level (grand-parented etc) by possibleParent

    hasAnyParentValue
    hasChild

    Returns true if possibleChild is contained within maxDepth children of parent node. By default only looks at immediate children (maxDepth = 0).

    hasChildValue
    hasParent

    Returns true if child exists within possibleParent. By default it only looks at the immediate parent (maxDepth: 0). Use Number.MAX_SAFE_INTEGER for searching recursively upwards (or hasAnyParent)

    hasParentValue

    Checks if a child node has a parent with a certain value Note: by default only checks immediate parent. Set maxDepth to a large value to recurse

    parents

    Iterates over parents of node, starting with immediate parent

    siblings

    Iterates over siblings of node.

    toString
    toStringDeep