Function existsOne

  • existsOne(test: ((elem: Element) => boolean), nodes: AnyNode[]): boolean
  • Checks if a tree of nodes contains at least one node passing a test.

    Returns

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

    Parameters

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

      Function to test nodes on.

        • (elem: Element): boolean
        • Parameters

          • elem: Element

          Returns boolean

    • nodes: AnyNode[]

      Array of nodes to search.

    Returns boolean