@@ -1718,7 +1718,7 @@ Document.prototype.$__setValue = function(path, val) {
17181718/**
17191719 * Returns the value of a path.
17201720 *
1721- * #### Example
1721+ * #### Example:
17221722 *
17231723 * // path
17241724 * doc.get('age') // 47
@@ -1891,7 +1891,7 @@ Document.prototype.$ignore = function(path) {
18911891 * A path `a` may be in `modifiedPaths()` but not in `directModifiedPaths()`
18921892 * because a child of `a` was directly modified.
18931893 *
1894- * #### Example
1894+ * #### Example:
18951895 * const schema = new Schema({ foo: String, nested: { bar: String } });
18961896 * const Model = mongoose.model('Test', schema);
18971897 * await Model.create({ foo: 'original', nested: { bar: 'original' } });
@@ -2047,7 +2047,7 @@ Document.prototype[documentModifiedPaths] = Document.prototype.modifiedPaths;
20472047 *
20482048 * If `path` is given, checks if a path or any full path containing `path` as part of its path chain has been modified.
20492049 *
2050- * #### Example
2050+ * #### Example:
20512051 *
20522052 * doc.set('documents.0.title', 'changed');
20532053 * doc.isModified() // true
@@ -2093,7 +2093,7 @@ Document.prototype[documentIsModified] = Document.prototype.isModified;
20932093/**
20942094 * Checks if a path is set to its default.
20952095 *
2096- * #### Example
2096+ * #### Example:
20972097 *
20982098 * MyModel = mongoose.model('test', { name: { type: String, default: 'Val '} });
20992099 * const m = new MyModel();
@@ -2157,7 +2157,7 @@ Document.prototype.$isDeleted = function(val) {
21572157/**
21582158 * Returns true if `path` was directly set and modified, else false.
21592159 *
2160- * #### Example
2160+ * #### Example:
21612161 *
21622162 * doc.set('documents.0.title', 'changed');
21632163 * doc.isDirectModified('documents.0.title') // true
@@ -2213,7 +2213,7 @@ Document.prototype.isInit = function(path) {
22132213/**
22142214 * Checks if `path` was selected in the source query which initialized this document.
22152215 *
2216- * #### Example
2216+ * #### Example:
22172217 *
22182218 * const doc = await Thing.findOne().select('name');
22192219 * doc.isSelected('name') // true
@@ -2294,7 +2294,7 @@ Document.prototype.$__isSelected = Document.prototype.isSelected;
22942294 * Checks if `path` was explicitly selected. If no projection, always returns
22952295 * true.
22962296 *
2297- * #### Example
2297+ * #### Example:
22982298 *
22992299 * Thing.findOne().select('nested.name').exec(function (err, doc) {
23002300 * doc.isDirectSelected('nested.name') // true
@@ -3636,7 +3636,7 @@ Document.prototype.$toObject = function(options, json) {
36363636 *
36373637 * schema.set('toObject', { virtuals: true })
36383638 *
3639- * #### Transform
3639+ * #### Transform:
36403640 *
36413641 * We may need to perform a transformation of the resulting object based on some criteria, say to remove some sensitive information or return a custom object. In this case we set the optional `transform` function.
36423642 *
@@ -3648,7 +3648,7 @@ Document.prototype.$toObject = function(options, json) {
36483648 * - `ret` The plain object representation which has been converted
36493649 * - `options` The options in use (either schema options or the options passed inline)
36503650 *
3651- * #### Example
3651+ * #### Example:
36523652 *
36533653 * // specify the transform schema option
36543654 * if (!schema.options.toObject) schema.options.toObject = {};
0 commit comments