CoolFace
Datasetpublic

basant307/AI_Governance_Project

sourceHugging Faceapache-2.0updated 2mo agoView on Hugging Face
0likes48downloads
isPlainObject.mjs16 linesDownload Raw Back to predicate
1function isPlainObject(value) {2    if (!value || typeof value !== 'object') {3        return false;4    }5    const proto = Object.getPrototypeOf(value);6    const hasObjectPrototype = proto === null ||7        proto === Object.prototype ||8        Object.getPrototypeOf(proto) === null;9    if (!hasObjectPrototype) {10        return false;11    }12    return Object.prototype.toString.call(value) === '[object Object]';13}14 15export { isPlainObject };16 
basant307/AI_Governance_Project · CoolFace