These are chat archives for Automattic/mongoose

Aug 2015
Aug 28 2015 06:42
in mongodb, db.collection.find({name:xxx},{age:1})
is there somebody know how to do it in nodejs
Felix Heck
Aug 28 2015 16:23
Hey guys,

i'm new to mongoDB and mongoose. Currently I'm developing an app, where it's necessary to check, if a passed argument is a mongoose.model Object.

Is there a simpler or better solution to check than the following?
typeof myVar === 'function' && new myVar() === 'model'