Mongoose schema plugin for toObject() Usage schema.plugin(require('mongoose-toobject'), { hide: '_id __v' });