* Creates a `_.sortedIndex` or `_.sortedLastIndex` function. * * @private * @param {boolean} [retHighest] Specify returning the highest qualified index. * @returns {Function} Returns the new index function.
(retHighest)
| 5135 | * @returns {Function} Returns the new index function. |
| 5136 | */ |
| 5137 | function createSortedIndex(retHighest) { |
| 5138 | return function(array, value, iteratee, thisArg) { |
| 5139 | var func = getCallback(iteratee); |
| 5140 | return (func === baseCallback && iteratee == null) |
| 5141 | ? binaryIndex(array, value, retHighest) |
| 5142 | : binaryIndexBy(array, value, func(iteratee, thisArg, 1), retHighest); |
| 5143 | }; |
| 5144 | } |
| 5145 | |
| 5146 | /** |
| 5147 | * Creates a function that either curries or invokes `func` with optional |
no test coverage detected