src/http/get-index/ssr.js
/**
 * Sort the parts of the passed selector,
 * as there is potential for optimization
 * (some types of selectors are faster than others)
 *
 * @param arr Selector to sort
 */
Sort the parts of the passed selector,
as there is potential for optimization
(some types of selectors are faster than others)

@param arr Selector to sort
Sort the parts of the passed selector as there is potential for optimization ( some types of selectors are faster than others ) @param arr Selector to sort
function sortByProcedure(arr) {
  var procs = arr.map(getProcedure);
  for (var i = 1; i < arr.length; i++) {
    var procNew = procs[i];
    if (procNew < 0)
    continue;
    for (var j = i - 1; j >= 0 && procNew < procs[j]; j--) {
      var token = arr[j + 1];
      arr[j + 1] = arr[j];
      arr[j] = token;
      procs[j + 1] = procs[j];
      procs[j] = procNew;
    }
  }
}
function sortByProcedure ( arr ) { var procs = arr . map ( getProcedure ) ; for ( var i = 1 ; i < arr . length ; i ++ ) { var procNew = procs [ i ] ; if ( procNew < 0 ) continue ; for ( var j = i - 1 ; j >= 0 && procNew < procs [ j ] ; j -- ) { var token = arr [ j + 1 ] ; arr [ j + 1 ] = arr [ j ] ; arr [ j ] = token ; procs [ j + 1 ] = procs [ j ] ; procs [ j ] = procNew ; } } }
Sort the parts of the passed selector,
 as there is potential for optimization
 (some types of selectors are faster than others)
Sort the parts of the passed selector as there is potential for optimization ( some types of selectors are faster than others )