mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 01:17:50 +00:00
Remove baseIteratee and castFunction.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user