mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-31 07:17:50 +00:00
Add doc note to _.isPlainObject for objects created by Object.create(null). [closes #526] [ci skip]
This commit is contained in:
@@ -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))) {
|
||||
|
||||
Reference in New Issue
Block a user