bpms_site/.svn/pristine/75/758b629dae590cec8a4f72f777c7419b2a5f55c0.svn-base
2025-11-02 16:38:49 +03:30

20 lines
704 B
Plaintext

export function getObjectClassLabel(value) {
return Object.prototype.toString.call(value);
}
export function isPlainObject(value) {
if (getObjectClassLabel(value) !== "[object Object]") {
return false;
}
const prototype = Object.getPrototypeOf(value);
/**
* this used to be previously:
*
* `return prototype === null || prototype === Object.prototype`
*
* but Edge Runtime expose Object from vm, being that kind of type-checking wrongly fail.
*
* It was changed to the current implementation since it's resilient to serialization.
*/ return prototype === null || prototype.hasOwnProperty("isPrototypeOf");
}
//# sourceMappingURL=is-plain-object.js.map