MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / createSortedIndex

Function createSortedIndex

lib/web/jshint.js:5137–5144  ·  view source on GitHub ↗

* Creates a `_.sortedIndex` or `_.sortedLastIndex` function. * * @private * @param {boolean} [retHighest] Specify returning the highest qualified index. * @returns {Function} Returns the new index function.

(retHighest)

Source from the content-addressed store, hash-verified

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

Callers 1

runInContextFunction · 0.85

Calls 3

getCallbackFunction · 0.85
binaryIndexFunction · 0.85
binaryIndexByFunction · 0.85

Tested by

no test coverage detected