function compareAscending(a, b) {
    var ai = a.index,
        bi = b.index;

    a = a.criteria;
    b = b.criteria;

    if (a === undefined) {
      return 1;
    }
    if (b === undefined) {
      return -1;
    }
    // ensure a stable sort in V8 and other engines
    // http://code.google.com/p/v8/issues/detail?id=90
    return a < b ? -1 : a > b ? 1 : ai < bi ? -1 : 1;
  }
Used by `sortBy` to compare transformed `collection` values, stable sorting
them in ascending order.

@private
@param {Object} a The object to compare to `b`.
@param {Object} b The object to compare to `a`.
@returns {Number} Returns the sort order indicator of `1` or `-1`.