-
-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Description
I have a plain JS object that is failing the check because it has an attribute called "constructor". But it is defined as a string. This should still be considered a plain JS object.
const myPlainObj = {"code":"invalid_user_password","constructor":"Object","extras":{},"message":"invalid_user_password"};
if (isPlainObject(myPlainObj)) console.log('It is Plain');
else console.log(":(");
https://github.com/jonschlinkert/is-plain-object/blob/master/is-plain-object.js#L17-L19 would likely need to change.
I can create a PR if you'd like.
Metadata
Metadata
Assignees
Labels
No labels