jccp_a/vuepress/node_modules/is-plain-obj/index.js
hellcat ac91e1fbe4 1
2025-11-12 17:57:30 +08:00

9 lines
344 B
JavaScript

export default function isPlainObject(value) {
if (typeof value !== 'object' || value === null) {
return false;
}
const prototype = Object.getPrototypeOf(value);
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in value) && !(Symbol.iterator in value);
}