Skip to content

Commit 6a10d4f

Browse files
committed
style: add ":" to all jsdoc headers where missing
This is to change the style to be consistent and headers with ":" seem to be the most used, so it was changed to that
1 parent 4c7e85c commit 6a10d4f

File tree

11 files changed

+95
-95
lines changed

11 files changed

+95
-95
lines changed

lib/aggregate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1052,7 +1052,7 @@ Aggregate.prototype.catch = function(reject) {
10521052
* You do not need to call this function explicitly, the JavaScript runtime
10531053
* will call it for you.
10541054
*
1055-
* #### Example
1055+
* #### Example:
10561056
*
10571057
* const agg = Model.aggregate([{ $match: { age: { $gte: 25 } } }]);
10581058
* for await (const doc of agg) {

lib/connection.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ Connection.prototype.__proto__ = EventEmitter.prototype;
9393
*
9494
* Each state change emits its associated event name.
9595
*
96-
* #### Example
96+
* #### Example:
9797
*
9898
* conn.on('connected', callback);
9999
* conn.on('disconnected', callback);
@@ -193,7 +193,7 @@ Connection.prototype.collections;
193193
/**
194194
* The name of the database this connection points to.
195195
*
196-
* #### Example
196+
* #### Example:
197197
*
198198
* mongoose.createConnection('mongodb://localhost:27017/mydb').name; // "mydb"
199199
*
@@ -210,7 +210,7 @@ Connection.prototype.name;
210210
* a map from model names to models. Contains all models that have been
211211
* added to this connection using [`Connection#model()`](/docs/api/connection.html#connection_Connection-model).
212212
*
213-
* #### Example
213+
* #### Example:
214214
*
215215
* const conn = mongoose.createConnection();
216216
* const Test = conn.model('Test', mongoose.Schema({ name: String }));
@@ -230,7 +230,7 @@ Connection.prototype.models;
230230
* A number identifier for this connection. Used for debugging when
231231
* you have [multiple connections](/docs/connections.html#multiple_connections).
232232
*
233-
* #### Example
233+
* #### Example:
234234
*
235235
* // The default connection has `id = 0`
236236
* mongoose.connection.id; // 0
@@ -274,7 +274,7 @@ Object.defineProperty(Connection.prototype, 'plugins', {
274274
* The host name portion of the URI. If multiple hosts, such as a replica set,
275275
* this will contain the first host name in the URI
276276
*
277-
* #### Example
277+
* #### Example:
278278
*
279279
* mongoose.createConnection('mongodb://localhost:27017/mydb').host; // "localhost"
280280
*
@@ -294,7 +294,7 @@ Object.defineProperty(Connection.prototype, 'host', {
294294
* The port portion of the URI. If multiple hosts, such as a replica set,
295295
* this will contain the port from the first host name in the URI.
296296
*
297-
* #### Example
297+
* #### Example:
298298
*
299299
* mongoose.createConnection('mongodb://localhost:27017/mydb').port; // 27017
300300
*
@@ -313,7 +313,7 @@ Object.defineProperty(Connection.prototype, 'port', {
313313
/**
314314
* The username specified in the URI
315315
*
316-
* #### Example
316+
* #### Example:
317317
*
318318
* mongoose.createConnection('mongodb://val:psw@localhost:27017/mydb').user; // "val"
319319
*
@@ -332,7 +332,7 @@ Object.defineProperty(Connection.prototype, 'user', {
332332
/**
333333
* The password specified in the URI
334334
*
335-
* #### Example
335+
* #### Example:
336336
*
337337
* mongoose.createConnection('mongodb://val:psw@localhost:27017/mydb').pass; // "psw"
338338
*

lib/cursor/AggregationCursor.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ if (Symbol.asyncIterator != null) {
107107
* Registers a transform function which subsequently maps documents retrieved
108108
* via the streams interface or `.next()`
109109
*
110-
* #### Example
110+
* #### Example:
111111
*
112112
* // Map documents returned by `data` events
113113
* Thing.
@@ -227,7 +227,7 @@ AggregationCursor.prototype.eachAsync = function(fn, opts, callback) {
227227
* You do not need to call this function explicitly, the JavaScript runtime
228228
* will call it for you.
229229
*
230-
* #### Example
230+
* #### Example:
231231
*
232232
* // Async iterator without explicitly calling `cursor()`. Mongoose still
233233
* // creates an AggregationCursor instance internally.

lib/cursor/QueryCursor.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ QueryCursor.prototype._read = function() {
112112
* Registers a transform function which subsequently maps documents retrieved
113113
* via the streams interface or `.next()`
114114
*
115-
* #### Example
115+
* #### Example:
116116
*
117117
* // Map documents returned by `data` events
118118
* Thing.
@@ -212,7 +212,7 @@ QueryCursor.prototype.next = function(callback) {
212212
* will wait for the promise to resolve before iterating on to the next one.
213213
* Returns a promise that resolves when done.
214214
*
215-
* #### Example
215+
* #### Example:
216216
*
217217
* // Iterate over documents asynchronously
218218
* Thing.
@@ -301,7 +301,7 @@ QueryCursor.prototype._transformForAsyncIterator = function() {
301301
* You do not need to call this function explicitly, the JavaScript runtime
302302
* will call it for you.
303303
*
304-
* #### Example
304+
* #### Example:
305305
*
306306
* // Works without using `cursor()`
307307
* for await (const doc of Model.find([{ $sort: { name: 1 } }])) {

lib/document.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -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 = {};

lib/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -801,7 +801,7 @@ Object.defineProperty(Mongoose.prototype, 'Connection', {
801801
/**
802802
* The Mongoose version
803803
*
804-
* #### Example
804+
* #### Example:
805805
*
806806
* console.log(mongoose.version); // '5.x.x'
807807
*

lib/model.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2384,7 +2384,7 @@ Model.count = function count(conditions, callback) {
23842384
*
23852385
* Passing a `callback` executes the query.
23862386
*
2387-
* #### Example
2387+
* #### Example:
23882388
*
23892389
* Link.distinct('url', { clicks: {$gt: 100}}, function (err, result) {
23902390
* if (err) return handleError(err);

0 commit comments

Comments
 (0)