main repo

This commit is contained in:
Basilosaurusrex
2025-11-24 18:09:40 +01:00
parent b636ee5e70
commit f027651f9b
34146 changed files with 4436636 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
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