The value to check.
Returns true
if value
is a plain object, else false
.
5.6.0
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
Checks if
value
is a plain object, that is, an object created by theObject
constructor or one with a[[Prototype]]
ofnull
.