summaryrefslogtreecommitdiffstats
path: root/node_modules/mongoose/lib/options
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/mongoose/lib/options')
-rw-r--r--node_modules/mongoose/lib/options/PopulateOptions.js36
-rw-r--r--node_modules/mongoose/lib/options/SchemaArrayOptions.js39
-rw-r--r--node_modules/mongoose/lib/options/SchemaBufferOptions.js38
-rw-r--r--node_modules/mongoose/lib/options/SchemaDateOptions.js64
-rw-r--r--node_modules/mongoose/lib/options/SchemaDocumentArrayOptions.js68
-rw-r--r--node_modules/mongoose/lib/options/SchemaMapOptions.js43
-rw-r--r--node_modules/mongoose/lib/options/SchemaNumberOptions.js74
-rw-r--r--node_modules/mongoose/lib/options/SchemaObjectIdOptions.js38
-rw-r--r--node_modules/mongoose/lib/options/SchemaSingleNestedOptions.js42
-rw-r--r--node_modules/mongoose/lib/options/SchemaStringOptions.js116
-rw-r--r--node_modules/mongoose/lib/options/SchemaTypeOptions.js232
-rw-r--r--node_modules/mongoose/lib/options/VirtualOptions.js164
-rw-r--r--node_modules/mongoose/lib/options/propertyOptions.js8
-rw-r--r--node_modules/mongoose/lib/options/removeOptions.js14
-rw-r--r--node_modules/mongoose/lib/options/saveOptions.js14
15 files changed, 0 insertions, 990 deletions
diff --git a/node_modules/mongoose/lib/options/PopulateOptions.js b/node_modules/mongoose/lib/options/PopulateOptions.js
deleted file mode 100644
index 5b98194..0000000
--- a/node_modules/mongoose/lib/options/PopulateOptions.js
+++ /dev/null
@@ -1,36 +0,0 @@
-'use strict';
-
-const clone = require('../helpers/clone');
-
-class PopulateOptions {
- constructor(obj) {
- this._docs = {};
- this._childDocs = [];
-
- if (obj == null) {
- return;
- }
- obj = clone(obj);
- Object.assign(this, obj);
- if (typeof obj.subPopulate === 'object') {
- this.populate = obj.subPopulate;
- }
-
-
- if (obj.perDocumentLimit != null && obj.limit != null) {
- throw new Error('Can not use `limit` and `perDocumentLimit` at the same time. Path: `' + obj.path + '`.');
- }
- }
-}
-
-/**
- * The connection used to look up models by name. If not specified, Mongoose
- * will default to using the connection associated with the model in
- * `PopulateOptions#model`.
- *
- * @memberOf PopulateOptions
- * @property {Connection} connection
- * @api public
- */
-
-module.exports = PopulateOptions; \ No newline at end of file
diff --git a/node_modules/mongoose/lib/options/SchemaArrayOptions.js b/node_modules/mongoose/lib/options/SchemaArrayOptions.js
deleted file mode 100644
index ddd0b37..0000000
--- a/node_modules/mongoose/lib/options/SchemaArrayOptions.js
+++ /dev/null
@@ -1,39 +0,0 @@
-'use strict';
-
-const SchemaTypeOptions = require('./SchemaTypeOptions');
-
-/**
- * The options defined on an Array schematype.
- *
- * ####Example:
- *
- * const schema = new Schema({ tags: [String] });
- * schema.path('tags').options; // SchemaArrayOptions instance
- *
- * @api public
- * @inherits SchemaTypeOptions
- * @constructor SchemaArrayOptions
- */
-
-class SchemaArrayOptions extends SchemaTypeOptions {}
-
-const opts = require('./propertyOptions');
-
-/**
- * If this is an array of strings, an array of allowed values for this path.
- * Throws an error if this array isn't an array of strings.
- *
- * @api public
- * @property enum
- * @memberOf SchemaArrayOptions
- * @type Array
- * @instance
- */
-
-Object.defineProperty(SchemaArrayOptions.prototype, 'enum', opts);
-
-/*!
- * ignore
- */
-
-module.exports = SchemaArrayOptions; \ No newline at end of file
diff --git a/node_modules/mongoose/lib/options/SchemaBufferOptions.js b/node_modules/mongoose/lib/options/SchemaBufferOptions.js
deleted file mode 100644
index 258130d..0000000
--- a/node_modules/mongoose/lib/options/SchemaBufferOptions.js
+++ /dev/null
@@ -1,38 +0,0 @@
-'use strict';
-
-const SchemaTypeOptions = require('./SchemaTypeOptions');
-
-/**
- * The options defined on a Buffer schematype.
- *
- * ####Example:
- *
- * const schema = new Schema({ bitmap: Buffer });
- * schema.path('bitmap').options; // SchemaBufferOptions instance
- *
- * @api public
- * @inherits SchemaTypeOptions
- * @constructor SchemaBufferOptions
- */
-
-class SchemaBufferOptions extends SchemaTypeOptions {}
-
-const opts = require('./propertyOptions');
-
-/**
- * Set the default subtype for this buffer.
- *
- * @api public
- * @property subtype
- * @memberOf SchemaBufferOptions
- * @type Number
- * @instance
- */
-
-Object.defineProperty(SchemaBufferOptions.prototype, 'subtype', opts);
-
-/*!
- * ignore
- */
-
-module.exports = SchemaBufferOptions; \ No newline at end of file
diff --git a/node_modules/mongoose/lib/options/SchemaDateOptions.js b/node_modules/mongoose/lib/options/SchemaDateOptions.js
deleted file mode 100644
index 09bf27f..0000000
--- a/node_modules/mongoose/lib/options/SchemaDateOptions.js
+++ /dev/null
@@ -1,64 +0,0 @@
-'use strict';
-
-const SchemaTypeOptions = require('./SchemaTypeOptions');
-
-/**
- * The options defined on a Date schematype.
- *
- * ####Example:
- *
- * const schema = new Schema({ startedAt: Date });
- * schema.path('startedAt').options; // SchemaDateOptions instance
- *
- * @api public
- * @inherits SchemaTypeOptions
- * @constructor SchemaDateOptions
- */
-
-class SchemaDateOptions extends SchemaTypeOptions {}
-
-const opts = require('./propertyOptions');
-
-/**
- * If set, Mongoose adds a validator that checks that this path is after the
- * given `min`.
- *
- * @api public
- * @property min
- * @memberOf SchemaDateOptions
- * @type Date
- * @instance
- */
-
-Object.defineProperty(SchemaDateOptions.prototype, 'min', opts);
-
-/**
- * If set, Mongoose adds a validator that checks that this path is before the
- * given `max`.
- *
- * @api public
- * @property max
- * @memberOf SchemaDateOptions
- * @type Date
- * @instance
- */
-
-Object.defineProperty(SchemaDateOptions.prototype, 'max', opts);
-
-/**
- * If set, Mongoose creates a TTL index on this path.
- *
- * @api public
- * @property expires
- * @memberOf SchemaDateOptions
- * @type Date
- * @instance
- */
-
-Object.defineProperty(SchemaDateOptions.prototype, 'expires', opts);
-
-/*!
- * ignore
- */
-
-module.exports = SchemaDateOptions; \ No newline at end of file
diff --git a/node_modules/mongoose/lib/options/SchemaDocumentArrayOptions.js b/node_modules/mongoose/lib/options/SchemaDocumentArrayOptions.js
deleted file mode 100644
index f3fb7a9..0000000
--- a/node_modules/mongoose/lib/options/SchemaDocumentArrayOptions.js
+++ /dev/null
@@ -1,68 +0,0 @@
-'use strict';
-
-const SchemaTypeOptions = require('./SchemaTypeOptions');
-
-/**
- * The options defined on an Document Array schematype.
- *
- * ####Example:
- *
- * const schema = new Schema({ users: [{ name: string }] });
- * schema.path('users').options; // SchemaDocumentArrayOptions instance
- *
- * @api public
- * @inherits SchemaTypeOptions
- * @constructor SchemaDocumentOptions
- */
-
-class SchemaDocumentArrayOptions extends SchemaTypeOptions {}
-
-const opts = require('./propertyOptions');
-
-/**
- * If `true`, Mongoose will skip building any indexes defined in this array's schema.
- * If not set, Mongoose will build all indexes defined in this array's schema.
- *
- * ####Example:
- *
- * const childSchema = Schema({ name: { type: String, index: true } });
- * // If `excludeIndexes` is `true`, Mongoose will skip building an index
- * // on `arr.name`. Otherwise, Mongoose will build an index on `arr.name`.
- * const parentSchema = Schema({
- * arr: { type: [childSchema], excludeIndexes: true }
- * });
- *
- * @api public
- * @property excludeIndexes
- * @memberOf SchemaDocumentArrayOptions
- * @type Array
- * @instance
- */
-
-Object.defineProperty(SchemaDocumentArrayOptions.prototype, 'excludeIndexes', opts);
-
-/**
- * If set, overwrites the child schema's `_id` option.
- *
- * ####Example:
- *
- * const childSchema = Schema({ name: String });
- * const parentSchema = Schema({
- * child: { type: childSchema, _id: false }
- * });
- * parentSchema.path('child').schema.options._id; // false
- *
- * @api public
- * @property _id
- * @memberOf SchemaDocumentArrayOptions
- * @type Array
- * @instance
- */
-
-Object.defineProperty(SchemaDocumentArrayOptions.prototype, '_id', opts);
-
-/*!
- * ignore
- */
-
-module.exports = SchemaDocumentArrayOptions; \ No newline at end of file
diff --git a/node_modules/mongoose/lib/options/SchemaMapOptions.js b/node_modules/mongoose/lib/options/SchemaMapOptions.js
deleted file mode 100644
index 335d84a..0000000
--- a/node_modules/mongoose/lib/options/SchemaMapOptions.js
+++ /dev/null
@@ -1,43 +0,0 @@
-'use strict';
-
-const SchemaTypeOptions = require('./SchemaTypeOptions');
-
-/**
- * The options defined on a Map schematype.
- *
- * ####Example:
- *
- * const schema = new Schema({ socialMediaHandles: { type: Map, of: String } });
- * schema.path('socialMediaHandles').options; // SchemaMapOptions instance
- *
- * @api public
- * @inherits SchemaTypeOptions
- * @constructor SchemaMapOptions
- */
-
-class SchemaMapOptions extends SchemaTypeOptions {}
-
-const opts = require('./propertyOptions');
-
-/**
- * If set, specifies the type of this map's values. Mongoose will cast
- * this map's values to the given type.
- *
- * If not set, Mongoose will not cast the map's values.
- *
- * ####Example:
- *
- * // Mongoose will cast `socialMediaHandles` values to strings
- * const schema = new Schema({ socialMediaHandles: { type: Map, of: String } });
- * schema.path('socialMediaHandles').options.of; // String
- *
- * @api public
- * @property of
- * @memberOf SchemaMapOptions
- * @type Function|string
- * @instance
- */
-
-Object.defineProperty(SchemaMapOptions.prototype, 'of', opts);
-
-module.exports = SchemaMapOptions; \ No newline at end of file
diff --git a/node_modules/mongoose/lib/options/SchemaNumberOptions.js b/node_modules/mongoose/lib/options/SchemaNumberOptions.js
deleted file mode 100644
index 42b0a01..0000000
--- a/node_modules/mongoose/lib/options/SchemaNumberOptions.js
+++ /dev/null
@@ -1,74 +0,0 @@
-'use strict';
-
-const SchemaTypeOptions = require('./SchemaTypeOptions');
-
-/**
- * The options defined on a Number schematype.
- *
- * ####Example:
- *
- * const schema = new Schema({ count: Number });
- * schema.path('count').options; // SchemaNumberOptions instance
- *
- * @api public
- * @inherits SchemaTypeOptions
- * @constructor SchemaNumberOptions
- */
-
-class SchemaNumberOptions extends SchemaTypeOptions {}
-
-const opts = require('./propertyOptions');
-
-/**
- * If set, Mongoose adds a validator that checks that this path is at least the
- * given `min`.
- *
- * @api public
- * @property min
- * @memberOf SchemaNumberOptions
- * @type Number
- * @instance
- */
-
-Object.defineProperty(SchemaNumberOptions.prototype, 'min', opts);
-
-/**
- * If set, Mongoose adds a validator that checks that this path is less than the
- * given `max`.
- *
- * @api public
- * @property max
- * @memberOf SchemaNumberOptions
- * @type Number
- * @instance
- */
-
-Object.defineProperty(SchemaNumberOptions.prototype, 'max', opts);
-
-/**
- * If set, Mongoose adds a validator that checks that this path is strictly
- * equal to one of the given values.
- *
- * ####Example:
- * const schema = new Schema({
- * favoritePrime: {
- * type: Number,
- * enum: [3, 5, 7]
- * }
- * });
- * schema.path('favoritePrime').options.enum; // [3, 5, 7]
- *
- * @api public
- * @property enum
- * @memberOf SchemaNumberOptions
- * @type Array
- * @instance
- */
-
-Object.defineProperty(SchemaNumberOptions.prototype, 'enum', opts);
-
-/*!
- * ignore
- */
-
-module.exports = SchemaNumberOptions; \ No newline at end of file
diff --git a/node_modules/mongoose/lib/options/SchemaObjectIdOptions.js b/node_modules/mongoose/lib/options/SchemaObjectIdOptions.js
deleted file mode 100644
index cf887d0..0000000
--- a/node_modules/mongoose/lib/options/SchemaObjectIdOptions.js
+++ /dev/null
@@ -1,38 +0,0 @@
-'use strict';
-
-const SchemaTypeOptions = require('./SchemaTypeOptions');
-
-/**
- * The options defined on an ObjectId schematype.
- *
- * ####Example:
- *
- * const schema = new Schema({ testId: mongoose.ObjectId });
- * schema.path('testId').options; // SchemaObjectIdOptions instance
- *
- * @api public
- * @inherits SchemaTypeOptions
- * @constructor SchemaObjectIdOptions
- */
-
-class SchemaObjectIdOptions extends SchemaTypeOptions {}
-
-const opts = require('./propertyOptions');
-
-/**
- * If truthy, uses Mongoose's default built-in ObjectId path.
- *
- * @api public
- * @property auto
- * @memberOf SchemaObjectIdOptions
- * @type Boolean
- * @instance
- */
-
-Object.defineProperty(SchemaObjectIdOptions.prototype, 'auto', opts);
-
-/*!
- * ignore
- */
-
-module.exports = SchemaObjectIdOptions; \ No newline at end of file
diff --git a/node_modules/mongoose/lib/options/SchemaSingleNestedOptions.js b/node_modules/mongoose/lib/options/SchemaSingleNestedOptions.js
deleted file mode 100644
index c916d0f..0000000
--- a/node_modules/mongoose/lib/options/SchemaSingleNestedOptions.js
+++ /dev/null
@@ -1,42 +0,0 @@
-'use strict';
-
-const SchemaTypeOptions = require('./SchemaTypeOptions');
-
-/**
- * The options defined on a single nested schematype.
- *
- * ####Example:
- *
- * const schema = Schema({ child: Schema({ name: String }) });
- * schema.path('child').options; // SchemaSingleNestedOptions instance
- *
- * @api public
- * @inherits SchemaTypeOptions
- * @constructor SchemaSingleNestedOptions
- */
-
-class SchemaSingleNestedOptions extends SchemaTypeOptions {}
-
-const opts = require('./propertyOptions');
-
-/**
- * If set, overwrites the child schema's `_id` option.
- *
- * ####Example:
- *
- * const childSchema = Schema({ name: String });
- * const parentSchema = Schema({
- * child: { type: childSchema, _id: false }
- * });
- * parentSchema.path('child').schema.options._id; // false
- *
- * @api public
- * @property of
- * @memberOf SchemaSingleNestedOptions
- * @type Function|string
- * @instance
- */
-
-Object.defineProperty(SchemaSingleNestedOptions.prototype, '_id', opts);
-
-module.exports = SchemaSingleNestedOptions; \ No newline at end of file
diff --git a/node_modules/mongoose/lib/options/SchemaStringOptions.js b/node_modules/mongoose/lib/options/SchemaStringOptions.js
deleted file mode 100644
index 7654993..0000000
--- a/node_modules/mongoose/lib/options/SchemaStringOptions.js
+++ /dev/null
@@ -1,116 +0,0 @@
-'use strict';
-
-const SchemaTypeOptions = require('./SchemaTypeOptions');
-
-/**
- * The options defined on a string schematype.
- *
- * ####Example:
- *
- * const schema = new Schema({ name: String });
- * schema.path('name').options; // SchemaStringOptions instance
- *
- * @api public
- * @inherits SchemaTypeOptions
- * @constructor SchemaStringOptions
- */
-
-class SchemaStringOptions extends SchemaTypeOptions {}
-
-const opts = require('./propertyOptions');
-
-/**
- * Array of allowed values for this path
- *
- * @api public
- * @property enum
- * @memberOf SchemaStringOptions
- * @type Array
- * @instance
- */
-
-Object.defineProperty(SchemaStringOptions.prototype, 'enum', opts);
-
-/**
- * Attach a validator that succeeds if the data string matches the given regular
- * expression, and fails otherwise.
- *
- * @api public
- * @property match
- * @memberOf SchemaStringOptions
- * @type RegExp
- * @instance
- */
-
-Object.defineProperty(SchemaStringOptions.prototype, 'match', opts);
-
-/**
- * If truthy, Mongoose will add a custom setter that lowercases this string
- * using JavaScript's built-in `String#toLowerCase()`.
- *
- * @api public
- * @property lowercase
- * @memberOf SchemaStringOptions
- * @type Boolean
- * @instance
- */
-
-Object.defineProperty(SchemaStringOptions.prototype, 'lowercase', opts);
-
-/**
- * If truthy, Mongoose will add a custom setter that removes leading and trailing
- * whitespace using JavaScript's built-in `String#trim()`.
- *
- * @api public
- * @property trim
- * @memberOf SchemaStringOptions
- * @type Boolean
- * @instance
- */
-
-Object.defineProperty(SchemaStringOptions.prototype, 'trim', opts);
-
-/**
- * If truthy, Mongoose will add a custom setter that uppercases this string
- * using JavaScript's built-in `String#toUpperCase()`.
- *
- * @api public
- * @property uppercase
- * @memberOf SchemaStringOptions
- * @type Boolean
- * @instance
- */
-
-Object.defineProperty(SchemaStringOptions.prototype, 'uppercase', opts);
-
-/**
- * If set, Mongoose will add a custom validator that ensures the given
- * string's `length` is at least the given number.
- *
- * @api public
- * @property minlength
- * @memberOf SchemaStringOptions
- * @type Number
- * @instance
- */
-
-Object.defineProperty(SchemaStringOptions.prototype, 'minlength', opts);
-
-/**
- * If set, Mongoose will add a custom validator that ensures the given
- * string's `length` is at most the given number.
- *
- * @api public
- * @property maxlength
- * @memberOf SchemaStringOptions
- * @type Number
- * @instance
- */
-
-Object.defineProperty(SchemaStringOptions.prototype, 'maxlength', opts);
-
-/*!
- * ignore
- */
-
-module.exports = SchemaStringOptions; \ No newline at end of file
diff --git a/node_modules/mongoose/lib/options/SchemaTypeOptions.js b/node_modules/mongoose/lib/options/SchemaTypeOptions.js
deleted file mode 100644
index 5dc5995..0000000
--- a/node_modules/mongoose/lib/options/SchemaTypeOptions.js
+++ /dev/null
@@ -1,232 +0,0 @@
-'use strict';
-
-const clone = require('../helpers/clone');
-
-/**
- * The options defined on a schematype.
- *
- * ####Example:
- *
- * const schema = new Schema({ name: String });
- * schema.path('name').options instanceof mongoose.SchemaTypeOptions; // true
- *
- * @api public
- * @constructor SchemaTypeOptions
- */
-
-class SchemaTypeOptions {
- constructor(obj) {
- if (obj == null) {
- return this;
- }
- Object.assign(this, clone(obj));
- }
-}
-
-const opts = require('./propertyOptions');
-
-/**
- * The type to cast this path to.
- *
- * @api public
- * @property type
- * @memberOf SchemaTypeOptions
- * @type Function|String|Object
- * @instance
- */
-
-Object.defineProperty(SchemaTypeOptions.prototype, 'type', opts);
-
-/**
- * Function or object describing how to validate this schematype.
- *
- * @api public
- * @property validate
- * @memberOf SchemaTypeOptions
- * @type Function|Object
- * @instance
- */
-
-Object.defineProperty(SchemaTypeOptions.prototype, 'validate', opts);
-
-/**
- * Allows overriding casting logic for this individual path. If a string, the
- * given string overwrites Mongoose's default cast error message.
- *
- * ####Example:
- *
- * const schema = new Schema({
- * num: {
- * type: Number,
- * cast: '{VALUE} is not a valid number'
- * }
- * });
- *
- * // Throws 'CastError: "bad" is not a valid number'
- * schema.path('num').cast('bad');
- *
- * const Model = mongoose.model('Test', schema);
- * const doc = new Model({ num: 'fail' });
- * const err = doc.validateSync();
- *
- * err.errors['num']; // 'CastError: "fail" is not a valid number'
- *
- * @api public
- * @property cast
- * @memberOf SchemaTypeOptions
- * @type String
- * @instance
- */
-
-Object.defineProperty(SchemaTypeOptions.prototype, 'cast', opts);
-
-/**
- * If true, attach a required validator to this path, which ensures this path
- * path cannot be set to a nullish value. If a function, Mongoose calls the
- * function and only checks for nullish values if the function returns a truthy value.
- *
- * @api public
- * @property required
- * @memberOf SchemaTypeOptions
- * @type Function|Boolean
- * @instance
- */
-
-Object.defineProperty(SchemaTypeOptions.prototype, 'required', opts);
-
-/**
- * The default value for this path. If a function, Mongoose executes the function
- * and uses the return value as the default.
- *
- * @api public
- * @property default
- * @memberOf SchemaTypeOptions
- * @type Function|Any
- * @instance
- */
-
-Object.defineProperty(SchemaTypeOptions.prototype, 'default', opts);
-
-/**
- * The model that `populate()` should use if populating this path.
- *
- * @api public
- * @property ref
- * @memberOf SchemaTypeOptions
- * @type Function|String
- * @instance
- */
-
-Object.defineProperty(SchemaTypeOptions.prototype, 'ref', opts);
-
-/**
- * Whether to include or exclude this path by default when loading documents
- * using `find()`, `findOne()`, etc.
- *
- * @api public
- * @property select
- * @memberOf SchemaTypeOptions
- * @type Boolean|Number
- * @instance
- */
-
-Object.defineProperty(SchemaTypeOptions.prototype, 'select', opts);
-
-/**
- * If [truthy](https://masteringjs.io/tutorials/fundamentals/truthy), Mongoose will
- * build an index on this path when the model is
- * compiled.
- *
- * @api public
- * @property index
- * @memberOf SchemaTypeOptions
- * @type Boolean|Number|Object
- * @instance
- */
-
-Object.defineProperty(SchemaTypeOptions.prototype, 'index', opts);
-
-/**
- * If [truthy](https://masteringjs.io/tutorials/fundamentals/truthy), Mongoose
- * will build a unique index on this path when the
- * model is compiled. [The `unique` option is **not** a validator](/docs/validation.html#the-unique-option-is-not-a-validator).
- *
- * @api public
- * @property unique
- * @memberOf SchemaTypeOptions
- * @type Boolean|Number
- * @instance
- */
-
-Object.defineProperty(SchemaTypeOptions.prototype, 'unique', opts);
-
-/**
- * If [truthy](https://masteringjs.io/tutorials/fundamentals/truthy), Mongoose will
- * disallow changes to this path once the document
- * is saved to the database for the first time. Read more about [immutability in Mongoose here](http://thecodebarbarian.com/whats-new-in-mongoose-5-6-immutable-properties.html).
- *
- * @api public
- * @property immutable
- * @memberOf SchemaTypeOptions
- * @type Function|Boolean
- * @instance
- */
-
-Object.defineProperty(SchemaTypeOptions.prototype, 'immutable', opts);
-
-/**
- * If [truthy](https://masteringjs.io/tutorials/fundamentals/truthy), Mongoose will
- * build a sparse index on this path.
- *
- * @api public
- * @property sparse
- * @memberOf SchemaTypeOptions
- * @type Boolean|Number
- * @instance
- */
-
-Object.defineProperty(SchemaTypeOptions.prototype, 'sparse', opts);
-
-/**
- * If [truthy](https://masteringjs.io/tutorials/fundamentals/truthy), Mongoose
- * will build a text index on this path.
- *
- * @api public
- * @property text
- * @memberOf SchemaTypeOptions
- * @type Boolean|Number|Object
- * @instance
- */
-
-Object.defineProperty(SchemaTypeOptions.prototype, 'text', opts);
-
-/**
- * Define a transform function for this individual schema type.
- * Only called when calling `toJSON()` or `toObject()`.
- *
- * ####Example:
- *
- * const schema = Schema({
- * myDate: {
- * type: Date,
- * transform: v => v.getFullYear()
- * }
- * });
- * const Model = mongoose.model('Test', schema);
- *
- * const doc = new Model({ myDate: new Date('2019/06/01') });
- * doc.myDate instanceof Date; // true
- *
- * const res = doc.toObject({ transform: true });
- * res.myDate; // 2019
- *
- * @api public
- * @property transform
- * @memberOf SchemaTypeOptions
- * @type Function
- * @instance
- */
-
-Object.defineProperty(SchemaTypeOptions.prototype, 'transform', opts);
-
-module.exports = SchemaTypeOptions; \ No newline at end of file
diff --git a/node_modules/mongoose/lib/options/VirtualOptions.js b/node_modules/mongoose/lib/options/VirtualOptions.js
deleted file mode 100644
index a266414..0000000
--- a/node_modules/mongoose/lib/options/VirtualOptions.js
+++ /dev/null
@@ -1,164 +0,0 @@
-'use strict';
-
-const opts = require('./propertyOptions');
-
-class VirtualOptions {
- constructor(obj) {
- Object.assign(this, obj);
-
- if (obj != null && obj.options != null) {
- this.options = Object.assign({}, obj.options);
- }
- }
-}
-
-/**
- * Marks this virtual as a populate virtual, and specifies the model to
- * use for populate.
- *
- * @api public
- * @property ref
- * @memberOf VirtualOptions
- * @type String|Model|Function
- * @instance
- */
-
-Object.defineProperty(VirtualOptions.prototype, 'ref', opts);
-
-/**
- * Marks this virtual as a populate virtual, and specifies the path that
- * contains the name of the model to populate
- *
- * @api public
- * @property refPath
- * @memberOf VirtualOptions
- * @type String|Function
- * @instance
- */
-
-Object.defineProperty(VirtualOptions.prototype, 'refPath', opts);
-
-/**
- * The name of the property in the local model to match to `foreignField`
- * in the foreign model.
- *
- * @api public
- * @property localField
- * @memberOf VirtualOptions
- * @type String|Function
- * @instance
- */
-
-Object.defineProperty(VirtualOptions.prototype, 'localField', opts);
-
-/**
- * The name of the property in the foreign model to match to `localField`
- * in the local model.
- *
- * @api public
- * @property foreignField
- * @memberOf VirtualOptions
- * @type String|Function
- * @instance
- */
-
-Object.defineProperty(VirtualOptions.prototype, 'foreignField', opts);
-
-/**
- * Whether to populate this virtual as a single document (true) or an
- * array of documents (false).
- *
- * @api public
- * @property justOne
- * @memberOf VirtualOptions
- * @type Boolean
- * @instance
- */
-
-Object.defineProperty(VirtualOptions.prototype, 'justOne', opts);
-
-/**
- * If true, populate just the number of documents where `localField`
- * matches `foreignField`, as opposed to the documents themselves.
- *
- * If `count` is set, it overrides `justOne`.
- *
- * @api public
- * @property count
- * @memberOf VirtualOptions
- * @type Boolean
- * @instance
- */
-
-Object.defineProperty(VirtualOptions.prototype, 'count', opts);
-
-/**
- * Add an additional filter to populate, in addition to `localField`
- * matches `foreignField`.
- *
- * @api public
- * @property match
- * @memberOf VirtualOptions
- * @type Object|Function
- * @instance
- */
-
-Object.defineProperty(VirtualOptions.prototype, 'match', opts);
-
-/**
- * Additional options to pass to the query used to `populate()`:
- *
- * - `sort`
- * - `skip`
- * - `limit`
- *
- * @api public
- * @property options
- * @memberOf VirtualOptions
- * @type Object
- * @instance
- */
-
-Object.defineProperty(VirtualOptions.prototype, 'options', opts);
-
-/**
- * If true, add a `skip` to the query used to `populate()`.
- *
- * @api public
- * @property skip
- * @memberOf VirtualOptions
- * @type Number
- * @instance
- */
-
-Object.defineProperty(VirtualOptions.prototype, 'skip', opts);
-
-/**
- * If true, add a `limit` to the query used to `populate()`.
- *
- * @api public
- * @property limit
- * @memberOf VirtualOptions
- * @type Number
- * @instance
- */
-
-Object.defineProperty(VirtualOptions.prototype, 'limit', opts);
-
-/**
- * The `limit` option for `populate()` has [some unfortunate edge cases](/docs/populate.html#query-conditions)
- * when working with multiple documents, like `.find().populate()`. The
- * `perDocumentLimit` option makes `populate()` execute a separate query
- * for each document returned from `find()` to ensure each document
- * gets up to `perDocumentLimit` populated docs if possible.
- *
- * @api public
- * @property perDocumentLimit
- * @memberOf VirtualOptions
- * @type Number
- * @instance
- */
-
-Object.defineProperty(VirtualOptions.prototype, 'perDocumentLimit', opts);
-
-module.exports = VirtualOptions; \ No newline at end of file
diff --git a/node_modules/mongoose/lib/options/propertyOptions.js b/node_modules/mongoose/lib/options/propertyOptions.js
deleted file mode 100644
index b7488a3..0000000
--- a/node_modules/mongoose/lib/options/propertyOptions.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-
-module.exports = Object.freeze({
- enumerable: true,
- configurable: true,
- writable: true,
- value: void 0
-}); \ No newline at end of file
diff --git a/node_modules/mongoose/lib/options/removeOptions.js b/node_modules/mongoose/lib/options/removeOptions.js
deleted file mode 100644
index 0d91586..0000000
--- a/node_modules/mongoose/lib/options/removeOptions.js
+++ /dev/null
@@ -1,14 +0,0 @@
-'use strict';
-
-const clone = require('../helpers/clone');
-
-class RemoveOptions {
- constructor(obj) {
- if (obj == null) {
- return;
- }
- Object.assign(this, clone(obj));
- }
-}
-
-module.exports = RemoveOptions; \ No newline at end of file
diff --git a/node_modules/mongoose/lib/options/saveOptions.js b/node_modules/mongoose/lib/options/saveOptions.js
deleted file mode 100644
index 22ef437..0000000
--- a/node_modules/mongoose/lib/options/saveOptions.js
+++ /dev/null
@@ -1,14 +0,0 @@
-'use strict';
-
-const clone = require('../helpers/clone');
-
-class SaveOptions {
- constructor(obj) {
- if (obj == null) {
- return;
- }
- Object.assign(this, clone(obj));
- }
-}
-
-module.exports = SaveOptions; \ No newline at end of file