Add doc note to _.isPlainObject for objects created by Object.create(null). [closes #526] [ci skip]

This commit is contained in:
John-David Dalton
2014-04-13 19:03:56 -07:00
parent a47f356021
commit ffe8a729b7

View File

@@ -6453,7 +6453,8 @@
}
/**
* Checks if `value` is an object created by the `Object` constructor.
* Checks if `value` is an object created by the `Object` constructor or has
* a `[[Prototype]]` of `null`.
*
* @static
* @memberOf _
@@ -6475,6 +6476,9 @@
*
* _.isPlainObject({ 'x': 0, 'y': 0 });
* // => true
*
* _.isPlainObject(Object.create(null));
* // => true
*/
var isPlainObject = !getPrototypeOf ? shimIsPlainObject : function(value) {
if (!(value && toString.call(value) == objectClass) || (!support.argsClass && isArguments(value))) {