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

22 lines
454 B
Plaintext

/**
* Gets the value at `key`, unless `key` is "__proto__" or "constructor".
*
* @private
* @param {Object} object The object to query.
* @param {string} key The key of the property to get.
* @returns {*} Returns the property value.
*/
function safeGet(object, key) {
if (key === 'constructor' && typeof object[key] === 'function') {
return;
}
if (key == '__proto__') {
return;
}
return object[key];
}
export default safeGet;