-
Notifications
You must be signed in to change notification settings - Fork 13
map spec is too strict with object definition #57
Copy link
Copy link
Open
Description
I'm using map() to spec classes that have fields but I am getting rejected because it eventually uses lodash's isPlainObject() does not like my class instance. I tracked it down to some deep inspection of the value's prototype constructor therein that is rejecting my instance.
I'd like to suggest that we change to use lodash isObjectLike() instead. It is simpler and rejects functions as objects. It will accept arrays as objects, and if that is a problem then adding in a test for isArray could allow the object spec to be strict in that regard.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels