07f0019af797d21cabbd6ed9e7eea421aad11d17
[platform/framework/web/crosswalk-tizen.git] /
1 var baseCompareAscending = require('./baseCompareAscending');
2
3 /**
4  * Used by `_.sortBy` to compare transformed elements of a collection and stable
5  * sort them in ascending order.
6  *
7  * @private
8  * @param {Object} object The object to compare to `other`.
9  * @param {Object} other The object to compare to `object`.
10  * @returns {number} Returns the sort order indicator for `object`.
11  */
12 function compareAscending(object, other) {
13   return baseCompareAscending(object.criteria, other.criteria) || (object.index - other.index);
14 }
15
16 module.exports = compareAscending;