Function existsOne

  • Checks if a tree of nodes contains at least one node passing a test.

    Parameters

    • test: ((elem: Element) => boolean)

      Function to test nodes on.

        • (elem): boolean
        • Parameters

          • elem: Element

          Returns boolean

    • nodes: AnyNode[]

      Array of nodes to search.

    Returns boolean

    Whether a tree of nodes contains at least one node passing the test.