Move internal modules to “internal” folder.

This commit is contained in:
John-David Dalton
2017-01-10 00:44:25 -08:00
parent 2b05673125
commit 26ea38dcf4
500 changed files with 726 additions and 726 deletions

21
.internal/baseSortBy.js Normal file
View File

@@ -0,0 +1,21 @@
/**
* 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.
* @returns {Array} Returns `array`.
*/
function baseSortBy(array, comparer) {
let length = array.length;
array.sort(comparer);
while (length--) {
array[length] = array[length].value;
}
return array;
}
export default baseSortBy;