These are chat archives for Automattic/mongoose
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().constructor.name === 'model'