src/http/get-index/ssr.js
/**
 * Sort an array of nodes based on their relative position in the document and
 * remove any duplicate nodes. If the array contains nodes that do not belong
 * to the same document, sort order is unspecified.
 *
 * @param nodes Array of DOM nodes.
 * @returns Collection of unique nodes, sorted in document order.
 */
Sort an array of nodes based on their relative position in the document and
remove any duplicate nodes. If the array contains nodes that do not belong
to the same document, sort order is unspecified.

@param nodes Array of DOM nodes.
@returns Collection of unique nodes, sorted in document order.
Sort an array of nodes based on their relative position in the document and remove any duplicate nodes . If the array contains nodes that do not belong to the same document sort order is unspecified . @param nodes Array of DOM nodes . @returns Collection of unique nodes sorted in document order .
function uniqueSort(nodes) {
  nodes = nodes.filter(function (node, i, arr) {return !arr.includes(node, i + 1);});
  nodes.sort(function (a, b) {
    var relative = compareDocumentPosition(a, b);
    if (relative & 2 ) {
      return -1;
    } else
    if (relative & 4 ) {
      return 1;
    }
    return 0;
  });
  return nodes;
}
function uniqueSort ( nodes ) { nodes = nodes . filter ( function ( node , i , arr ) { return ! arr . includes ( node , i + 1 ) ; } ) ; nodes . sort ( function ( a , b ) { var relative = compareDocumentPosition ( a , b ) ; if ( relative & 2 ) { return - 1 ; } else if ( relative & 4 ) { return 1 ; } return 0 ; } ) ; return nodes ; }
Sort an array of nodes based on their relative position in the document and
 remove any duplicate nodes.
Sort an array of nodes based on their relative position in the document and remove any duplicate nodes .
/* PRECEDING */ /* FOLLOWING */