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

17 lines
445 B
Plaintext

/**
* @param obj The object to inspect.
* @returns True if the argument appears to be a plain object.
*/
export default function isPlainObject(obj: any): obj is object {
if (typeof obj !== 'object' || obj === null) return false
let proto = obj
while (Object.getPrototypeOf(proto) !== null) {
proto = Object.getPrototypeOf(proto)
}
return (
Object.getPrototypeOf(obj) === proto || Object.getPrototypeOf(obj) === null
)
}