Urara-Blog/node_modules/.pnpm-store/v3/files/99/44edd6fd99a48179b479add26b0e35c4027ef72858dc5ff99238be6637110ff6821aa5517c256c5f66d8cfc24004c3520f5d50d0191c88cd0f0bde33d3e3d8
2022-08-14 01:14:53 +08:00

20 lines
659 B
Text

var baseFindIndex = require('./_baseFindIndex'),
baseIsNaN = require('./_baseIsNaN'),
strictIndexOf = require('./_strictIndexOf');
/**
* 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 matched value, else `-1`.
*/
function baseIndexOf(array, value, fromIndex) {
return value === value
? strictIndexOf(array, value, fromIndex)
: baseFindIndex(array, baseIsNaN, fromIndex);
}
module.exports = baseIndexOf;