Urara-Blog/node_modules/.pnpm-store/v3/files/67/a2a46ca48519c8e767f44e5d2d62a96ac5695b060fc566ddbcdb51482cee254c69f4b03d436a1a7bf3cf6e385949653ad07eb436b602c9509df9415b1662b1
2022-08-14 01:14:53 +08:00

23 lines
600 B
Text

/**
* A specialized version of `_.indexOf` which performs strict equality
* comparisons of values, i.e. `===`.
*
* @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 strictIndexOf(array, value, fromIndex) {
var index = fromIndex - 1,
length = array.length;
while (++index < length) {
if (array[index] === value) {
return index;
}
}
return -1;
}
module.exports = strictIndexOf;