MCPcopy Create free account
hub / github.com/krasimir/react-in-patterns / isPlainObject

Function isPlainObject

code/redux/public/app.js:902–913  ·  view source on GitHub ↗

* 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 a plain

(value)

Source from the content-addressed store, hash-verified

900 * // => true
901 */
902function isPlainObject(value) {
903 if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
904 return false;
905 }
906 var proto = getPrototype(value);
907 if (proto === null) {
908 return true;
909 }
910 var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
911 return typeof Ctor == 'function' && Ctor instanceof Ctor &&
912 funcToString.call(Ctor) == objectCtorString;
913}
914
915module.exports = isPlainObject;
916

Callers 3

objToCssFunction · 0.85
flattenFunction · 0.85
app.jsFile · 0.85

Calls 2

isObjectLikeFunction · 0.85
baseGetTagFunction · 0.85

Tested by

no test coverage detected