4.17.11
3.10.1
2.4.2
1.3.1
_.isPlainObject(value)
Checks if value
is a plain object, that is, an object created by the
Object
constructor or one with a [[Prototype]]
of null
.
Since
0.8.0
Arguments
argument
value
type
*
description
The value to check.
Returns
(array)
Example
function Foo() {
this.a = 1;
}
_.isPlainObject(new Foo());
// => false
_.isPlainObject([1, 2, 3]);
// => false
_.isPlainObject({ x: 0, y: 0 });
// => true
_.isPlainObject(Object.create(null));
// => true
function Foo() {
this.a = 1;
}
_.isPlainObject(new Foo());
// => false
_.isPlainObject([1, 2, 3]);
// => false
_.isPlainObject({ x: 0, y: 0 });
// => true
_.isPlainObject(Object.create(null));
// => true