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

14 lines
428 B
Plaintext

import { isScalar } from '../nodes/identity.js';
function mapIncludes(ctx, items, search) {
const { uniqueKeys } = ctx.options;
if (uniqueKeys === false)
return false;
const isEqual = typeof uniqueKeys === 'function'
? uniqueKeys
: (a, b) => a === b || (isScalar(a) && isScalar(b) && a.value === b.value);
return items.some(pair => isEqual(pair.key, search));
}
export { mapIncludes };