Mongoose(s)

what is this all about?

When compiling a mongoose model the .model() method has the surprising behavior of automatically generating a pluralized version of the model name and using that as the target mongodb collection.

This inference only happens when no collection name is passed to the .model method or as an option to the Schema..

To generate the pluralized version of the name mongoose calls pluralize, which can be customized by the user but defaults to the mongoose-legacy-pluralize function.

This app uses the same default pluralizer to allow you to quickly inspect what collection mongoose would infer from a given model name.