-
-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Description
In lodash, the following three cases all return true,
_.isPlainObject({ x: 0, y: 0 }) // true
_.isPlainObject(Object.create(null)) //true
_.isPlainObject(new Object()) //true
but in is-what it’s different.
d.isPlainObject({ x: 0, y: 0 }) //true
d.isPlainObject(Object.create(null)) //false
d.isPlainObject(new Object()) // true
So, is this difference intentional by design, or is it a bug?
Here are some new findings: jQuery and Lodash behave consistently.
$.isPlainObject({ x: 0, y: 0 }) // true
$.isPlainObject(Object.create(null)) //true
$.isPlainObject(new Object()) //true
Metadata
Metadata
Assignees
Labels
No labels