MCPcopy Create free account
hub / github.com/RubyLouvre/anu / isPlainObject

Function isPlainObject

test/babel.js:28865–28875  ·  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

(value)

Source from the content-addressed store, hash-verified

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

Callers 1

baseMergeDeepFunction · 0.70

Calls 2

isObjectLikeFunction · 0.70
baseGetTagFunction · 0.70

Tested by

no test coverage detected