MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / baseSortBy

Function baseSortBy

lib/web/jshint.js:4162–4170  ·  view source on GitHub ↗

* The base implementation of `_.sortBy` which uses `comparer` to define * the sort order of `array` and replaces criteria objects with their * corresponding values. * * @private * @param {Array} array The array to sort. * @param {Function} comparer The function to defin

(array, comparer)

Source from the content-addressed store, hash-verified

4160 * @returns {Array} Returns `array`.
4161 */
4162 function baseSortBy(array, comparer) {
4163 var length = array.length;
4164
4165 array.sort(comparer);
4166 while (length--) {
4167 array[length] = array[length].value;
4168 }
4169 return array;
4170 }
4171
4172 /**
4173 * The base implementation of `_.sortByOrder` without param guards.

Callers 2

baseSortByOrderFunction · 0.85
sortByFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected