Mongoose Autopopulate Global Option
Installation
Install using npm
npm i mongoose-autopopulate-extend
Plugin Options
var mongoose_autopopulate_extend = require("mongoose-autopopulate-extend");
mongoose.plugin(autopopulateExtend, {
match: { status: "ENABLED", deleted: false },
maxDepth: 1
});