* 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 define sort order
(array, comparer)
| 942 | * @returns {Array} Returns `array`. |
| 943 | */ |
| 944 | function baseSortBy(array, comparer) { |
| 945 | var length = array.length; |
| 946 | |
| 947 | array.sort(comparer); |
| 948 | while (length--) { |
| 949 | array[length] = array[length].value; |
| 950 | } |
| 951 | return array; |
| 952 | } |
| 953 | |
| 954 | /** |
| 955 | * The base implementation of `_.sum` and `_.sumBy` without support for |