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

21 lines
576 B
Text

/**
* A specialized version of `_.lastIndexOf` 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 strictLastIndexOf(array, value, fromIndex) {
var index = fromIndex + 1;
while (index--) {
if (array[index] === value) {
return index;
}
}
return index;
}
module.exports = strictLastIndexOf;