tupleson
Version:
A hackable JSON serializer/deserializer
16 lines • 349 B
JavaScript
const isPlainObject = (obj) => {
if (!obj || typeof obj !== "object") {
return false;
}
if (obj === Object.prototype) {
return false;
}
if (Object.getPrototypeOf(obj) === null) {
return true;
}
return Object.getPrototypeOf(obj) === Object.prototype;
};
export {
isPlainObject
};
//# sourceMappingURL=isPlainObject.mjs.map