basant307/AI_Governance_Project
048
1const getType = (value) => (Object.prototype.toString.call(value).slice(8, -1).toLowerCase());2function isPlainObject(value) {3 if (getType(value) !== "object") {4 return false;5 }6 const pp = Object.getPrototypeOf(value);7 if (pp === null || pp === undefined) {8 return true;9 }10 const Ctor = pp.constructor && pp.constructor.toString();11 return Ctor === Object.toString();12}13export default isPlainObject;14 