I'm reading the source of mongoose, find such code in https://github.com/LearnBoost/mongoose/blob/master/lib/collection.js#L23:
/**
* The collection name
*
* @api public
*/
Collection.prototype.name;
I don't understand why this line exist. Does it here just for generating document?
Yes.
It helps anyone reading the code know that this property is meant to be accessed publicly, and helps the doc generator signal the same.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With