2 * The base implementation of `_.sortBy` which uses `comparer` to define the
3 * sort order of `array` and replaces criteria objects with their corresponding
7 * @param {Array} array The array to sort.
8 * @param {Function} comparer The function to define sort order.
9 * @returns {Array} Returns `array`.
11 function baseSortBy(array, comparer) {
12 var length = array.length;
16 array[length] = array[length].value;
21 module.exports = baseSortBy;