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

Function createFindIndex

lib/web/jshint.js:4810–4818  ·  view source on GitHub ↗

* Creates a `_.findIndex` or `_.findLastIndex` function. * * @private * @param {boolean} [fromRight] Specify iterating from right to left. * @returns {Function} Returns the new find function.

(fromRight)

Source from the content-addressed store, hash-verified

4808 * @returns {Function} Returns the new find function.
4809 */
4810 function createFindIndex(fromRight) {
4811 return function(array, predicate, thisArg) {
4812 if (!(array && array.length)) {
4813 return -1;
4814 }
4815 predicate = getCallback(predicate, thisArg, 3);
4816 return baseFindIndex(array, predicate, fromRight);
4817 };
4818 }
4819
4820 /**
4821 * Creates a `_.findKey` or `_.findLastKey` function.

Callers 1

runInContextFunction · 0.85

Calls 2

getCallbackFunction · 0.85
baseFindIndexFunction · 0.85

Tested by

no test coverage detected