@lesnoypudge/utils
Version:
lesnoypudge's utils
19 lines (18 loc) • 471 B
JavaScript
const isObject = (value) => {
return Object.prototype.toString.call(value) === "[object Object]";
};
const isPlainObject = (value) => {
if (!isObject(value)) return false;
const ctor = value.constructor;
if (ctor === void 0) return true;
const prot = ctor.prototype;
if (!isObject(prot)) return false;
if (!prot.hasOwnProperty("isPrototypeOf")) {
return false;
}
return true;
};
export {
isPlainObject
};
//# sourceMappingURL=isPlainObject.js.map