Initial commit
[yaffs-website] / node_modules / grunt-contrib-watch / node_modules / lodash / internal / compareAscending.js
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.
9  * @param {Object} other The other object to compare.
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;