Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

mongoose-autopopulate-extend

akashtech27MIT2.1.0

Mongoose Autopopulate global configuration

mongoose, fuzzy, searching, search, plugin, mongo, mongodb, autopopulate, autopopulate global configuration

readme

Mongoose Autopopulate Global Option

Installation

Install using npm

npm i mongoose-autopopulate-extend mongoose-autopopulate --save

yarn add mongoose-autopopulate-extend mongoose-autopopulate

Plugin Options

const mongoose = require("mongoose");
var mongoose_autopopulate_extend = require("mongoose-autopopulate-extend");

mongoose.plugin(mongoose_autopopulate_extend, globalOptions);
  • Local Option will override global options for a field

Example:

mongoose.plugin(mongoose_autopopulate_extend, {
  match: { status: "ENABLED", deleted: false },
  maxDepth: 1
});