MCPcopy Index your code
hub / github.com/deployd/deployd / findIndex

Function findIndex

test-app/public/sinon.js:17876–17886  ·  view source on GitHub ↗

* This method is like `_.find` except that it returns the index of the first * element `predicate` returns truthy for instead of the element itself. * * @static * @memberOf _ * @since 1.1.0 * @category Array * @param {Array} array The ar

(array, predicate, fromIndex)

Source from the content-addressed store, hash-verified

17874 * // => 2
17875 */
17876 function findIndex(array, predicate, fromIndex) {
17877 var length = array == null ? 0 : array.length;
17878 if (!length) {
17879 return -1;
17880 }
17881 var index = fromIndex == null ? 0 : toInteger(fromIndex);
17882 if (index < 0) {
17883 index = nativeMax(length + index, 0);
17884 }
17885 return baseFindIndex(array, getIteratee(predicate, 3), index);
17886 }
17887
17888 /**
17889 * This method is like `_.findIndex` except that it iterates over elements

Callers

nothing calls this directly

Calls 3

toIntegerFunction · 0.85
baseFindIndexFunction · 0.85
getIterateeFunction · 0.85

Tested by

no test coverage detected