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

20 lines
611 B
Plaintext

function getIgnoreAttributesFn(ignoreAttributes) {
if (typeof ignoreAttributes === 'function') {
return ignoreAttributes
}
if (Array.isArray(ignoreAttributes)) {
return (attrName) => {
for (const pattern of ignoreAttributes) {
if (typeof pattern === 'string' && attrName === pattern) {
return true
}
if (pattern instanceof RegExp && pattern.test(attrName)) {
return true
}
}
}
}
return () => false
}
module.exports = getIgnoreAttributesFn