index.js
function compare (options, less, x, y) {
  const ifLess = options.asc ? -1 : 1;

  return less(x, y) ? ifLess
    : less(y, x) ? -ifLess
    : 0;
}
function compare (options, less, x, y) {
  const ifLess = options.asc ? -1 : 1;

  return less(x, y) ? ifLess
    : less(y, x) ? -ifLess
    : 0;
}
function compare ( options , less , x , y ) { const ifLess = options . asc ? - 1 : 1 ; return less ( x , y ) ? ifLess : less ( y , x ) ? - ifLess : 0 ; }
Core comparator logic.
Core comparator logic .