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

21 lines
528 B
Plaintext

// given an input that may or may not be an object, return an object that has
// a copy of every defined property listed in 'copy'. if the input is not an
// object, assign it to the property named by 'wrap'
const getOptions = (input, { copy, wrap }) => {
const result = {}
if (input && typeof input === 'object') {
for (const prop of copy) {
if (input[prop] !== undefined) {
result[prop] = input[prop]
}
}
} else {
result[wrap] = input
}
return result
}
module.exports = getOptions