UNPKG

@easy-breezy/core

Version:
17 lines (16 loc) 450 B
export const isObject = (value) => { return Object.prototype.toString.call(value) === '[object Object]'; }; export const isPlainObject = (value) => { if (!isObject(value)) { return false; } if (value.constructor === undefined) { return true; } if (!isObject(value.constructor.prototype) || !value.constructor.prototype.hasOwnProperty('isPrototypeOf')) { return false; } return true; };