Optional
dropIf you want to drop the whole database.
NB: The admin database cannot be dropped and is ignored.
Default: true
Optional
emptyIf you want to empty collections without dropping them and their databases. If both "emptyDatabases" and this options are true, this option will be used as a fallback if a collection drop fails.
NB: If "dropDatabases", "emptyDatabases" and "emptyCollections" are all false, this option will eventually become true.
Default: false
Optional
emptyIf you want to drop databases' collections without dropping the databases. If both "dropDatabases" and this options are true, this option will be used as a fallback if a database drop fails.
Default: false
Optional
keepA string, a RegExp, a function or an array of both specifying databases that will not be cleaned.
Default: []
Optional
logIf you want to display the clean method's log on console.
Default: false
Optional
noIf you want the method to skip asking confirm before cleaning the MongoDB.
Default: true
Optional
numberThe number of times a drop or empty operation is retried before throwing an error or passing to a fallback.
Default: 1
Optional
retryThe number of milliseconds between two attempts of a drop or empty operation.
Default: 20
Optional
throwIf you want to throw a MongoCleanerCleanError when MongoDB is only partially cleaned.
Default: false
Generated using TypeDoc
The options of the mongo-cleaner clean function.