inProgress-team / react-native-meteor

Meteor Reactivity for your React Native application :)
MIT License
693 stars 210 forks source link

Change isPlainObject to match the functionality of Meteor. #268

Open gunn opened 7 years ago

gunn commented 7 years ago

The isPlainObject function is only used to check whether an object returned from a collection transformation is valid.

The actual function used is defined in meteor here: https://github.com/meteor/meteor/blob/3e4accda7cf3f/packages/minimongo/local_collection.js#L1104 which in turn calls this: https://github.com/meteor/meteor/blob/3e4accda7cf3f/packages/minimongo/matcher.js#L133

Since we don't care about classifying the other types, I've compressed the logic.

I care about this because my transform returns an object with a constructor which works with meteor but currently not react-native-meteor.