* Checks if `value` is a plain object, that is, an object created by the * `Object` constructor or one with a `[[Prototype]]` of `null`. * * @static * @memberOf _ * @since 0.8.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is
(value)
| 28863 | * // => true |
| 28864 | */ |
| 28865 | function isPlainObject(value) { |
| 28866 | if (!isObjectLike(value) || baseGetTag(value) != objectTag) { |
| 28867 | return false; |
| 28868 | } |
| 28869 | var proto = getPrototype(value); |
| 28870 | if (proto === null) { |
| 28871 | return true; |
| 28872 | } |
| 28873 | var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; |
| 28874 | return typeof Ctor == 'function' && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString; |
| 28875 | } |
| 28876 | |
| 28877 | module.exports = isPlainObject; |
| 28878 |
no test coverage detected