meteor/minimongo/sort.js
function (i) {
    var self = this;
    var invert = !self._sortSpecParts[i].ascending;
    return function (key1, key2) {
      var compare = LocalCollection._f._cmp(key1[i], key2[i]);
      if (invert)
        compare = -compare;
      return compare;
    };
  }
function (i) {
    var self = this;
    var invert = !self._sortSpecParts[i].ascending;
    return function (key1, key2) {
      var compare = LocalCollection._f._cmp(key1[i], key2[i]);
      if (invert)
        compare = -compare;
      return compare;
    };
  }
function ( i ) { var self = this ; var invert = ! self . _sortSpecParts [ i ] . ascending ; return function ( key1 , key2 ) { var compare = LocalCollection . _f . _cmp ( key1 [ i ] , key2 [ i ] ) ; if ( invert ) compare = - compare ; return compare ; } ; }
Given an index 'i', returns a comparator that compares two key arrays based on field 'i'.
Given an index i returns a comparator that compares two key arrays based on field i .