Files
biomedjs/node_modules/lodash/internal/compareAscending.js

17 lines
565 B
JavaScript
Raw Permalink Normal View History

2015-04-20 05:31:12 -04:00
var baseCompareAscending = require('./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 to `other`.
* @param {Object} other The object to compare to `object`.
* @returns {number} Returns the sort order indicator for `object`.
*/
function compareAscending(object, other) {
return baseCompareAscending(object.criteria, other.criteria) || (object.index - other.index);
}
module.exports = compareAscending;