1 var baseCompareAscending = require('./baseCompareAscending');
4 * Used by `_.sortBy` to compare transformed elements of a collection and stable
5 * sort them in ascending order.
8 * @param {Object} object The object to compare.
9 * @param {Object} other The other object to compare.
10 * @returns {number} Returns the sort order indicator for `object`.
12 function compareAscending(object, other) {
13 return baseCompareAscending(object.criteria, other.criteria) || (object.index - other.index);
16 module.exports = compareAscending;