MCPcopy
hub / github.com/lodash/lodash / baseIndexOf

Function baseIndexOf

lodash.js:833–837  ·  view source on GitHub ↗

* The base implementation of `_.indexOf` without `fromIndex` bounds checks. * * @private * @param {Array} array The array to inspect. * @param {*} value The value to search for. * @param {number} fromIndex The index to search from. * @returns {number} Returns the index of the match

(array, value, fromIndex)

Source from the content-addressed store, hash-verified

831 * @returns {number} Returns the index of the matched value, else `-1`.
832 */
833 function baseIndexOf(array, value, fromIndex) {
834 return value === value
835 ? strictIndexOf(array, value, fromIndex)
836 : baseFindIndex(array, baseIsNaN, fromIndex);
837 }
838
839 /**
840 * This function is like `baseIndexOf` except that it accepts a comparator.

Callers 5

arrayIncludesFunction · 0.85
charsStartIndexFunction · 0.85
charsEndIndexFunction · 0.85
indexOfFunction · 0.85
includesFunction · 0.85

Calls 2

strictIndexOfFunction · 0.85
baseFindIndexFunction · 0.85

Tested by

no test coverage detected