domutils
    Preparing search index...

    Function uniqueSort

    • Sort an array of nodes based on their relative position in the document, removing any duplicate nodes. If the array contains nodes that do not belong to the same document, sort order is unspecified.

      Type Parameters

      • T extends AnyNode

      Parameters

      • nodes: T[]

        Array of DOM nodes.

      Returns T[]

      Collection of unique nodes, sorted in document order.