This repository was archived by the owner on Jul 8, 2019. It is now read-only.
1.1.0
- ⭐ Feature:
MongooseAutoIncrementID
instances now have the following readonly properties:isReady
- Whether or not the initialisation has completedpromise
- The promise returned by applyPlugin()error
- Error, if any, thrown by applyPlugin()
- ⭐ Feature:
MongooseIncrementID
now has the following static methods:isReady(schema: Schema, modelName: string): boolean
- Check if the given schema and model have finished their plugin initialisationgetErrorFor(schema: Schema, modelName: string): Error | undefined
- Check if the given schema and model threw an error during initialisationgetPromiseFor(schema: Schema, modelName: string): Promise<void> | undefined
- get the promise returned during initialisation for the given schema and model
- ⭐ Feature: getDefaults() static method added - returns the default options used by the plugin
- ⭐ Feature: setDefaults static method added - override the default options used by the plugin
- 🔄 Refactor: nextCount and resetCount functions are now created during initialisation instead of getting cloned via
.bind(this)