Remove baseIteratee and castFunction.

This commit is contained in:
John-David Dalton
2017-01-09 17:17:03 -08:00
parent efcf51c7bf
commit 65654f8f9e
96 changed files with 140 additions and 537 deletions

View File

@@ -1,4 +1,3 @@
import baseIteratee from './_baseIteratee.js';
import baseSortedIndexBy from './_baseSortedIndexBy.js';
/**
@@ -12,7 +11,7 @@ import baseSortedIndexBy from './_baseSortedIndexBy.js';
* @category Array
* @param {Array} array The sorted array to inspect.
* @param {*} value The value to evaluate.
* @param {Function} [iteratee=_.identity] The iteratee invoked per element.
* @param {Function} iteratee The iteratee invoked per element.
* @returns {number} Returns the index at which `value` should be inserted
* into `array`.
* @example
@@ -21,13 +20,9 @@ import baseSortedIndexBy from './_baseSortedIndexBy.js';
*
* _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
* // => 0
*
* // The `_.property` iteratee shorthand.
* _.sortedIndexBy(objects, { 'x': 4 }, 'x');
* // => 0
*/
function sortedIndexBy(array, value, iteratee) {
return baseSortedIndexBy(array, value, baseIteratee(iteratee, 2));
return baseSortedIndexBy(array, value, iteratee);
}
export default sortedIndexBy;