Files
NapCatQQ/.pnpm-store/v3/files/20/870f8dc804ce7b3781b83dcbc377154686eefbaa7cfdddcf3b2691e05a0c801f829b0e7e40d57bad9b8f2968ed528eacaebc960aef57f7bfef0b9f2a6dd362
T
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

22 lines
485 B
Plaintext

import eq from './eq.js';
/**
* Gets the index at which the `key` is found in `array` of key-value pairs.
*
* @private
* @param {Array} array The array to inspect.
* @param {*} key The key to search for.
* @returns {number} Returns the index of the matched value, else `-1`.
*/
function assocIndexOf(array, key) {
var length = array.length;
while (length--) {
if (eq(array[length][0], key)) {
return length;
}
}
return -1;
}
export default assocIndexOf;