Files
lodash/internal/compareAscending.js
John-David Dalton 75c633becb Bump to v3.10.0.
2015-12-16 17:52:15 -08:00

18 lines
574 B
JavaScript

define(['./baseCompareAscending'], function(baseCompareAscending) {
/**
* Used by `_.sortBy` to compare transformed elements of a collection and stable
* sort them in ascending order.
*
* @private
* @param {Object} object The object to compare.
* @param {Object} other The other object to compare.
* @returns {number} Returns the sort order indicator for `object`.
*/
function compareAscending(object, other) {
return baseCompareAscending(object.criteria, other.criteria) || (object.index - other.index);
}
return compareAscending;
});