{"id":14956956,"url":"https://github.com/euberdeveloper/mongo-cleaner","last_synced_at":"2026-01-20T15:33:29.089Z","repository":{"id":36932964,"uuid":"231150165","full_name":"euberdeveloper/mongo-cleaner","owner":"euberdeveloper","description":"An npm module to quickly clean your mongodb","archived":false,"fork":false,"pushed_at":"2023-03-09T01:22:43.000Z","size":1027,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-09T11:21:23.467Z","etag":null,"topics":["mocha","mongodb","npm","typescript"],"latest_commit_sha":null,"homepage":"https://mongo-cleaner.euber.dev/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/euberdeveloper.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-12-31T21:54:47.000Z","updated_at":"2023-02-19T02:10:12.000Z","dependencies_parsed_at":"2024-09-22T02:00:49.561Z","dependency_job_id":null,"html_url":"https://github.com/euberdeveloper/mongo-cleaner","commit_stats":{"total_commits":135,"total_committers":2,"mean_commits":67.5,"dds":0.0444444444444444,"last_synced_commit":"b1371df5baa407134b5ddec0170045873b8e7753"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/euberdeveloper/mongo-cleaner","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/euberdeveloper%2Fmongo-cleaner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/euberdeveloper%2Fmongo-cleaner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/euberdeveloper%2Fmongo-cleaner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/euberdeveloper%2Fmongo-cleaner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/euberdeveloper","download_url":"https://codeload.github.com/euberdeveloper/mongo-cleaner/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/euberdeveloper%2Fmongo-cleaner/sbom","scorecard":{"id":384567,"data":{"date":"2025-08-11","repo":{"name":"github.com/euberdeveloper/mongo-cleaner","commit":"b1371df5baa407134b5ddec0170045873b8e7753"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.5,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/build.yml:1","Warn: no topLevel permission defined: .github/workflows/dree.yml:1","Warn: no topLevel permission defined: .github/workflows/lint.yml:1","Warn: no topLevel permission defined: .github/workflows/test.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/euberdeveloper/mongo-cleaner/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/euberdeveloper/mongo-cleaner/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/dree.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/euberdeveloper/mongo-cleaner/dree.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/dree.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/euberdeveloper/mongo-cleaner/dree.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/dree.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/euberdeveloper/mongo-cleaner/dree.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lint.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/euberdeveloper/mongo-cleaner/lint.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lint.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/euberdeveloper/mongo-cleaner/lint.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/euberdeveloper/mongo-cleaner/test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/euberdeveloper/mongo-cleaner/test.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/euberdeveloper/mongo-cleaner/test.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/euberdeveloper/mongo-cleaner/test.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yml:46: update your workflow using https://app.stepsecurity.io/secureworkflow/euberdeveloper/mongo-cleaner/test.yml/main?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/build.yml:21","Warn: npmCommand not pinned by hash: .github/workflows/lint.yml:21","Warn: npmCommand not pinned by hash: .github/workflows/test.yml:33","Info:   0 out of   7 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   5 third-party GitHubAction dependencies pinned","Info:   0 out of   3 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: GNU General Public License v3.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"16 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-67mh-4wv8-2f99","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-78xj-cgh5-2h22","Warn: Project is vulnerable to: GHSA-2p57-rm9w-gvfp","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-vxvm-qww3-2fh7","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-18T16:17:44.547Z","repository_id":36932964,"created_at":"2025-08-18T16:17:44.547Z","updated_at":"2025-08-18T16:17:44.547Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28606142,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T14:45:23.139Z","status":"ssl_error","status_checked_at":"2026-01-20T14:44:16.929Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mocha","mongodb","npm","typescript"],"created_at":"2024-09-24T13:13:47.377Z","updated_at":"2026-01-20T15:33:29.070Z","avatar_url":"https://github.com/euberdeveloper.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Build](https://github.com/euberdeveloper/mongo-cleaner/workflows/Build/badge.svg)\n![Test](https://github.com/euberdeveloper/mongo-cleaner/workflows/Test/badge.svg)\n![Lint](https://github.com/euberdeveloper/mongo-cleaner/workflows/Lint/badge.svg)\n[![Coverage Status](https://coveralls.io/repos/github/euberdeveloper/mongo-cleaner/badge.svg?branch=master)](https://coveralls.io/github/euberdeveloper/mongo-cleaner?branch=master)\n[![Codecov Status](https://codecov.io/gh/euberdeveloper/mongo-cleaner/branch/master/graph/badge.svg)](https://codecov.io/gh/euberdeveloper/mongo-cleaner)\n[![Known Vulnerabilities](https://snyk.io/test/github/euberdeveloper/mongo-cleaner/badge.svg?targetFile=package.json)](https://snyk.io/test/github/euberdeveloper/mongo-cleaner?targetFile=package.json)\n[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)\n[![GitHub issues](https://img.shields.io/github/issues/euberdeveloper/mongo-cleaner.svg)](https://github.com/euberdeveloper/mongo-cleaner/issues)\n[![Types](https://img.shields.io/npm/types/mongo-cleaner.svg)](https://www.npmjs.com/package/mongo-cleaner)\n[![License](https://img.shields.io/npm/l/mongo-cleaner.svg?color=blue)](https://github.com/euberdeveloper/mongo-cleaner/blob/master/LICENSE)\n[![GitHub stars](https://img.shields.io/github/stars/euberdeveloper/mongo-cleaner.svg)](https://github.com/euberdeveloper/mongo-cleaner/stargazers)\n![npm](https://img.shields.io/npm/v/mongo-cleaner.svg)\n\n# mongo-cleaner\n\nAn npm module to quickly clean your mongodb, both from code and cli.\n\n## Install\n\nTo install mongo-cleaner as a local module:\n\n```bash\n$ npm install mongo-cleaner\n```\n\nTo install mongo-cleaner as a global module:\n\n```bash\n$ npm install -g mongo-cleaner\n```\n\n## Usage (local module)\n\n### Clear everything\n\n```js\nconst mongoCleaner = require('mongoCleaner');\nawait mongoCleaner.clean();\n```\n\n### Specify connection\n\n```js\nconst mongoCleaner = require('mongoCleaner');\nconst uri = 'mongodb://localhost:27017';\nconst mongoClientOptions = { numberOfRetries: 10 };\n\nawait mongoCleaner.clean(uri, mongoClientOptions);\n```\n\n### Ask a confirm and show logs\n\n```js\nconst mongoCleaner = require('mongoCleaner');\nconst options = {\n    noConfirm: false,\n    log: true\n};\n\nawait mongoCleaner.clean(null, null, options);\n```\n\n### Keep some databases\n\n```js\nconst mongoCleaner = require('mongoCleaner');\nconst options = {\n    keep: ['animals', /test$/]\n};\n\nawait mongoCleaner.clean(null, null, options);\n```\n\n### Only remove collections' documents\n\n```js\nconst mongoCleaner = require('mongoCleaner');\nconst options = {\n    dropDatabases: false,\n    emptyDatabases: false,\n    emptyCollections: true\n};\n\nawait mongoCleaner.clean(null, null, options);\n```\n\n### Only drop collections or remove their documents as a fallback\n\n```js\nconst mongoCleaner = require('mongoCleaner');\nconst options = {\n    dropDatabases: true,\n    emptyDatabases: true,\n    emptyCollections: true\n};\n\nawait mongoCleaner.clean(null, null, options);\n```\n\n### Throw an error if only partially cleaned\n\n```js\nconst mongoCleaner = require('mongoCleaner');\nconst options = {\n    throwIfNotTotal: true\n};\n\nawait mongoCleaner.clean(null, null, options);\n```\n\n## Usage (global module)\n\n### Clear everything\n\n```bash\n$ mongo-cleaner clean\n```\n\nThis way everything on `mongodb://localhost:27017` will be cleaned\n\n### Skip confirmation\n\n```bash\n$ mongo-cleaner clean -y\n```\n\nThis way no proceeding-confirmation will be asked.\n\n### Keep databases\n\n```bash\n$ mongo-cleaner clean --keep first second /test$/i\n```\n\nThis way first, second and all databases that end with \"test\" (case-insensitive) will be keeped.\n\n### Specify uri\n\n```bash\n$ mongo-cleaner clean --uri mongodb://localhost:8080\n```\n\nThis way everything on `mongodb://localhost:8080` will be cleaned.\n\n### Specify uri with other options\n\n```bash\n$ mongo-cleaner clean --host localhost --port 27017 --username euber --password secret --srv\n```\n\nThis way everything on `srv+mongodb://euber:pass@localhost:27017` will be cleaned.\n\n### Specify options file\n\n```bash\n$ mongo-cleaner clean -o mongo-cleaner.config.json -y\n```\n\nThis way options will be taken by the file `./mongo-cleaner.config.json`. These options do not overwrite\nthe command ones, so in every case of this example no confirmation to proceed will be asked.\n\n### See all options\n\n```bash\n$ mongo-cleaner --help\n```\n\n## API\n\n### clean\n\n**Syntax:**\n\n`mongoCleaner.clean(uri, connectionOptions, options)`\n\n**Description:**\n\nTries to remove all the databases of MongoDB. \nThe function is __asynchronous__ and returns nothing.\nSee __Usage__ to have an example.\n\n**Parameters:**\n\n* __uri__: Optional. The `string` uri of the mongodb connection. Default: `mongodb://localhost:27017`.\n* __connectionOptions__: Optional. The options for the MongoDB connection. This function uses the npm module mongodb under the hood, so these are the `MongoClientOptions`. By default, if not explicitly set to false, \"useUnifiedTopology\" and \"useNewUrlParser\" are set to true.\n* __options__: Optional. The `MongoCleanerOptions` object for the cleaner. You can specify things such as asking a confirm before cleaning, databases to be kept, keeping collections and removing their documents.\n\n**MongoCleanerOptions parameters:**\n\n* __noConfirm__: Default value: `true`. If you want the method to skip asking confirm before cleaning the MongoDB.\n* __keep__: Default value: `[]`. A `string`, a `RegExp`, a `(db: name) =\u003e boolean` or an `array of all of them` specifying databases that will not be cleaned.\n* __log__: Default value: `false`. If you want to display the clean method's log on console. \n* __dropDatabases__: Default value: `true`. If you want to drop the whole database. NB: The admin database cannot be dropped and is ignored.\n* __emptyDatabases__: Default value: `false`. If 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.\n* __emptyCollections__: Default value: `false`. If 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.\n* __numberOfRetries__: Default value: `1`. The number of times a drop or empty operation is retried before throwing an error or passing to a fallback.\n* __retryMilliseconds__: Default value: `20`. The number of milliseconds between two attempts of a drop or empty operation.\n* __throwIfNotTotal__: Default value: `false`. If you want to throw a `MongoCleanerCleanError` when MongoDB is only partially cleaned.\n\n## Project structure\n\n[//]: # (dree - BEGIN)\nMade with [dree](https://github.com/marketplace/actions/ga-dree)\n\n\n```\nmongo-cleaner\n ├── .eslintignore\n ├── .eslintrc.cjs\n ├─\u003e .git\n │   ├── FETCH_HEAD\n │   ├── HEAD\n │   ├─\u003e branches\n │   ├── config\n │   ├── description\n │   ├─\u003e hooks\n │   │   ├── applypatch-msg.sample\n │   │   ├── commit-msg.sample\n │   │   ├── fsmonitor-watchman.sample\n │   │   ├── post-update.sample\n │   │   ├── pre-applypatch.sample\n │   │   ├── pre-commit.sample\n │   │   ├── pre-merge-commit.sample\n │   │   ├── pre-push.sample\n │   │   ├── pre-rebase.sample\n │   │   ├── pre-receive.sample\n │   │   ├── prepare-commit-msg.sample\n │   │   ├── push-to-checkout.sample\n │   │   └── update.sample\n │   ├── index\n │   ├─\u003e info\n │   │   └── exclude\n │   ├─\u003e logs\n │   │   ├── HEAD\n │   │   └─\u003e refs\n │   │       ├─\u003e heads\n │   │       │   └── main\n │   │       └─\u003e remotes\n │   │           └─\u003e origin\n │   │               └── main\n │   ├─\u003e objects\n │   │   ├─\u003e 05\n │   │   │   └── 9cc46d3d07605c13643edf1e6cfed527e667a3\n │   │   ├─\u003e 0b\n │   │   │   └── 5d89bfd6b4dfe653f01379a61988ce0f4ddb12\n │   │   ├─\u003e 0d\n │   │   │   ├── 335eddf6fbd714b2bf22334e4526a0ae8f1e1a\n │   │   │   └── 3a1da2c42da6727506970672b48326caad9271\n │   │   ├─\u003e 11\n │   │   │   └── be53359311769d78d1d13d2d454f874b591353\n │   │   ├─\u003e 1c\n │   │   │   └── 8f781fb5673d39e75bb0faff39630a29b9df7a\n │   │   ├─\u003e 1d\n │   │   │   └── ba9ae4d10e071f990e1f1cbd034dcf83b84c4a\n │   │   ├─\u003e 21\n │   │   │   └── 3fbf3b65a7925634c0cb115cd5632e90d21d02\n │   │   ├─\u003e 28\n │   │   │   ├── 480df97aecbcdd8cce80d457949ac40a69985c\n │   │   │   └── b307cf203bdc6f72e9869fade771fa388118db\n │   │   ├─\u003e 2a\n │   │   │   ├── 62e132ed3c9ff75777e29670113dd687e25321\n │   │   │   └── 96bc4a1f6bf1753e99a1ced903f2b0cc40d956\n │   │   ├─\u003e 38\n │   │   │   └── b771979b2e74d20c7667dce65295917c1ffe63\n │   │   ├─\u003e 39\n │   │   │   └── 7519b58d522d79847c340869361c2654e7d23f\n │   │   ├─\u003e 3b\n │   │   │   └── 211c5cdd37eef30b71d3648b6c3ecae0a71e18\n │   │   ├─\u003e 3d\n │   │   │   └── 7d9df85b0b7b920dd44986990ed8f80a9c1f70\n │   │   ├─\u003e 43\n │   │   │   └── e5b430d498295fbce9b223ee96eed56ae4abe7\n │   │   ├─\u003e 45\n │   │   │   └── 4c145f0c74dbfd8713274736f3d456850f6a4f\n │   │   ├─\u003e 47\n │   │   │   └── 4f2dfbd1694e0d38e43a89304fd5cb12bd6940\n │   │   ├─\u003e 4b\n │   │   │   └── 5ad7195e5abe3e0c5453a8d2fb1879b74ae9e2\n │   │   ├─\u003e 4e\n │   │   │   └── a6bea88d9210e492d0b479a29461380366f853\n │   │   ├─\u003e 4f\n │   │   │   └── af9e74310a59139a4a37a9585ab87b4a19c82d\n │   │   ├─\u003e 52\n │   │   │   └── 136322e55eb1c5affa671762e45a360d1472e9\n │   │   ├─\u003e 53\n │   │   │   └── 8242c502f50857efd83d54059345b8060adc71\n │   │   ├─\u003e 56\n │   │   │   ├── 14e99459bf235c5f986633302ee6fedc39ba22\n │   │   │   └── 3e15ea3bf5dd8e99a8f60775a33d1ed17c930e\n │   │   ├─\u003e 59\n │   │   │   └── b812098a099dba6195f7fdb45b603aa7b060b8\n │   │   ├─\u003e 5a\n │   │   │   └── d9d4bd07397ede8244c6d4078cdafd6f662e8a\n │   │   ├─\u003e 5b\n │   │   │   ├── 099658e3e910a80b2f5eaaf19f7b6205d7b1da\n │   │   │   └── c490de1e42f70ea2571ea2a26297441f649826\n │   │   ├─\u003e 60\n │   │   │   └── b0987a6257d05465127746cc217c1c301252c5\n │   │   ├─\u003e 64\n │   │   │   └── 3c352ee7cc293ceb5e1848ff376a892373f95d\n │   │   ├─\u003e 68\n │   │   │   └── 312e0d21831a4f12aa827838c80e65d7749fe2\n │   │   ├─\u003e 69\n │   │   │   └── e6c67534c9b7c4b952b7e79b66438e408056fa\n │   │   ├─\u003e 72\n │   │   │   └── 2a0e804eaa9bf3665fb92e549d1dc67889d0ee\n │   │   ├─\u003e 73\n │   │   │   ├── 9862ae461d91d0d5310a90adb938768bdc408f\n │   │   │   └── c077e16b4e863d390cc414af0b2562072e10a1\n │   │   ├─\u003e 74\n │   │   │   └── d547acdb280008c6eee744842b49d43d153c64\n │   │   ├─\u003e 75\n │   │   │   └── 68d03c2dd5c9451ac24f251fd9e56df0d12754\n │   │   ├─\u003e 76\n │   │   │   └── ac1d9700e8a5fd6ec9a79bd30a2cf74edf2e88\n │   │   ├─\u003e 77\n │   │   │   └── c37dc0a6213e082a5736fdd039d12dcec7b21e\n │   │   ├─\u003e 79\n │   │   │   └── b449e5d74cd0c2a1b470fbde12c050225711b3\n │   │   ├─\u003e 7b\n │   │   │   └── f3b5f8d48f470c09eaa690bee564dbd1178d77\n │   │   ├─\u003e 7d\n │   │   │   └── ce8e8646f090b88b1bff94824e991348f0d415\n │   │   ├─\u003e 80\n │   │   │   └── 74a990f6d23f8c87ec00ea2e479b0066f9dd46\n │   │   ├─\u003e 82\n │   │   │   └── d59eba265e0615a79632fe8ad0c3c21d46548d\n │   │   ├─\u003e 84\n │   │   │   ├── 98b779b5cd60a34435ddfc868b4f2fe28ccf74\n │   │   │   └── a078f799817cd034257adf8b0375cffbc3b20a\n │   │   ├─\u003e 86\n │   │   │   └── eff4e6e981e3d8c24e763ca3219d191fdde279\n │   │   ├─\u003e 87\n │   │   │   └── baddb48f2ad661972119f6d17d6a10903d211d\n │   │   ├─\u003e 88\n │   │   │   └── ef4375ecd2f065daf4da9ea89eb883af022349\n │   │   ├─\u003e 8a\n │   │   │   └── bb4fa046b6170a989ad1b273ed67b4a9258a00\n │   │   ├─\u003e 91\n │   │   │   ├── 84cf3cdc07b94f45de2c7a233608915dac54a6\n │   │   │   └── 87051ccdf2b34bf80fcac57bde2f354d9b32c5\n │   │   ├─\u003e 93\n │   │   │   └── 6efbaec634a7ca6fc3faa5b603fc9d4fb4c6d7\n │   │   ├─\u003e 98\n │   │   │   └── e4bce57199bf7cc44f043c517411bf4adbaba5\n │   │   ├─\u003e 9c\n │   │   │   └── ed2fbe1356f3d95d930e2ea15af2ba12faccb7\n │   │   ├─\u003e 9d\n │   │   │   └── 5e07ece26f7d5a5daff75e7f5c395e3dfe0e35\n │   │   ├─\u003e a0\n │   │   │   └── 737d88729bdb222f75a0a3f27acd858c47c4bd\n │   │   ├─\u003e a6\n │   │   │   ├── ac61403388472f45b32840d710662120c22aad\n │   │   │   └── e2190002adddee71eba828885d9d1b2cebffdc\n │   │   ├─\u003e ad\n │   │   │   └── e16602af63b3e7bbaef52a029708e479fdacbd\n │   │   ├─\u003e b0\n │   │   │   └── 3000accb8a440473c7cb306f282f10277a739a\n │   │   ├─\u003e b6\n │   │   │   └── 86cc62f518bbc353e41e3f2f4d783b84fd89b8\n │   │   ├─\u003e bf\n │   │   │   └── ab56f107c20ef333f1cc17cb540cbdd20ae2e2\n │   │   ├─\u003e c1\n │   │   │   └── 8be790ea20c2511da4a93db4063ffb25ce3a6f\n │   │   ├─\u003e c3\n │   │   │   ├── b86952901a51f4672dfff994d386f2539af883\n │   │   │   └── c85ef64d9d84118e1f3e2b4241befadf4fa2ff\n │   │   ├─\u003e c4\n │   │   │   └── c3fd1fcfba259f53e6090e6b59ad1da1eb7eb7\n │   │   ├─\u003e c5\n │   │   │   └── e2b411bbc5e6f6649397ec715cc939cd2ea292\n │   │   ├─\u003e c7\n │   │   │   └── 7f2f359530a21152d29d1f63058c024dc6997a\n │   │   ├─\u003e cd\n │   │   │   └── 03ce4231c78b185eaa48e6ad5dc77058546e6f\n │   │   ├─\u003e d0\n │   │   │   └── 25b408e40c334abe3cab6e7ff55455e263e4c5\n │   │   ├─\u003e d7\n │   │   │   ├── 9c5196ea6456fc93e5f381a478f1bee63cc25f\n │   │   │   └── c0b9d537015f44efd76435b0ee73a06cd2479a\n │   │   ├─\u003e da\n │   │   │   └── ccccb19f105678c22da5476d239e76eb13c5a8\n │   │   ├─\u003e dd\n │   │   │   └── e1947c1734714c30036988b327ffaa31f7c6bd\n │   │   ├─\u003e de\n │   │   │   ├── 4f70fd78ae82f4122d660f9555186f2be7c3a1\n │   │   │   └── fd83cc4299e44017a75b93b86e9588a8ce6ae7\n │   │   ├─\u003e e1\n │   │   │   └── 946493557b46a3719b4124b52dbcf32fbb12ca\n │   │   ├─\u003e e2\n │   │   │   ├── 5f766b7d2ffd773d99800d602066eab8b5f069\n │   │   │   └── b9b22458a16af29c2fe705ee6a988cb6d220fd\n │   │   ├─\u003e e4\n │   │   │   └── ee0be8697d616bf9efb09c81b0dbf8c87bae86\n │   │   ├─\u003e e5\n │   │   │   └── 9c68fba8959b9f32f1cab7e4f3c81f2f62bc36\n │   │   ├─\u003e ea\n │   │   │   ├── 253414678173b9e0bd0df68e0c4fc616f7cd32\n │   │   │   └── 8745fb2c09648429b569a702dd34fc4a1dd8e5\n │   │   ├─\u003e f0\n │   │   │   └── bd172c3d97ac7bcf1cc87849768a5154bcef40\n │   │   ├─\u003e f2\n │   │   │   └── 88702d2fa16d3cdf0035b15a9fcbc552cd88e7\n │   │   ├─\u003e f4\n │   │   │   └── 2567c975c94a2a3461420d76dea0063cb87f7d\n │   │   ├─\u003e f5\n │   │   │   ├── 1f68151052cd8f4fa8dd0d6b2e0474e52d88a6\n │   │   │   ├── 97d65d8b7717866f6d7d1cf512a67c31982f8a\n │   │   │   ├── b70dd75b053f6f3ae95915564e4f400154c191\n │   │   │   └── d34f5ec8d74a114c38fe9fdb68b8965eb59836\n │   │   ├─\u003e f9\n │   │   │   └── 5b59494f8195607eacf53ff90abe1cd5043903\n │   │   ├─\u003e ff\n │   │   │   └── 920b25e17693100ac368e8c736238c020371fe\n │   │   ├─\u003e info\n │   │   └─\u003e pack\n │   ├─\u003e refs\n │   │   ├─\u003e heads\n │   │   │   └── main\n │   │   ├─\u003e remotes\n │   │   │   └─\u003e origin\n │   │   │       └── main\n │   │   └─\u003e tags\n │   └── shallow\n ├─\u003e .github\n │   └─\u003e workflows\n │       ├── build.yml\n │       ├── dree.yml\n │       ├── lint.yml\n │       └── test.yml\n ├── .gitignore\n ├── .prettierrc.cjs\n ├── LICENSE\n ├── README.md\n ├── babel.config.cjs\n ├── build.mjs\n ├─\u003e docs\n │   ├── .gitignore\n │   └─\u003e tree\n │       └── dree.config.json\n ├── jest.config.ts\n ├── package-lock.json\n ├── package.json\n ├─\u003e source\n │   ├─\u003e bin\n │   │   ├── .eslintrc.cjs\n │   │   ├── index.ts\n │   │   └─\u003e utils\n │   │       └── index.ts\n │   ├─\u003e lib\n │   │   ├─\u003e errors\n │   │   │   ├── index.ts\n │   │   │   ├── mongoCleanerCleanError.ts\n │   │   │   ├── mongoCleanerConnectionError.ts\n │   │   │   ├── mongoCleanerDisconnectionError.ts\n │   │   │   ├── mongoCleanerError.ts\n │   │   │   ├── mongoCleanerListCollectionsError.ts\n │   │   │   └── mongoCleanerListDatabasesError.ts\n │   │   ├── index.ts\n │   │   ├─\u003e types\n │   │   │   ├── exported.ts\n │   │   │   ├── index.ts\n │   │   │   └── internal.ts\n │   │   └─\u003e utils\n │   │       ├── askConfirm.ts\n │   │       ├── cleaner.ts\n │   │       ├── logger.ts\n │   │       └── options.ts\n │   └── tsconfig.json\n ├─\u003e test\n │   ├── .eslintrc.cjs\n │   ├── askConfirm.test.ts\n │   ├── clean.test.ts\n │   ├── errors.test.ts\n │   ├── logger.test.ts\n │   ├─\u003e mock\n │   │   ├─\u003e admin\n │   │   │   ├── system.version.bson\n │   │   │   └── system.version.metadata.json\n │   │   ├─\u003e animals\n │   │   │   ├── Cats.bson\n │   │   │   ├── Cats.metadata.json\n │   │   │   ├── Giaguars.bson\n │   │   │   ├── Giaguars.metadata.json\n │   │   │   ├── Leopards.bson\n │   │   │   ├── Leopards.metadata.json\n │   │   │   ├── Lions.bson\n │   │   │   ├── Lions.metadata.json\n │   │   │   ├── Tigers.bson\n │   │   │   └── Tigers.metadata.json\n │   │   ├─\u003e cars\n │   │   │   ├── AlfaRomeo.bson\n │   │   │   ├── AlfaRomeo.metadata.json\n │   │   │   ├── Ferrari.bson\n │   │   │   ├── Ferrari.metadata.json\n │   │   │   ├── McLaren.bson\n │   │   │   ├── McLaren.metadata.json\n │   │   │   ├── Mercedes.bson\n │   │   │   ├── Mercedes.metadata.json\n │   │   │   ├── RedBull.bson\n │   │   │   └── RedBull.metadata.json\n │   │   └─\u003e computers\n │   │       ├── Dell.bson\n │   │       ├── Dell.metadata.json\n │   │       ├── Mac.bson\n │   │       ├── Mac.metadata.json\n │   │       ├── Thinkpad.bson\n │   │       └── Thinkpad.metadata.json\n │   ├── options.test.ts\n │   └─\u003e utils\n │       ├── mockAskConfirm.ts\n │       └── mockOra.ts\n ├── tsconfig.json\n ├── typedoc.cjs\n └── typedoc.dev.cjs\n```\n[//]: # (dree - END)\n\n\n\n## Development\n\nTo build the module make sure you have the dev dependencies installed.\n\nThe project is written in `Typescript`, bundled with `Webpack` and linted with `ESLint`.\n\n### Lint\n\nIn order to lint the code:\n\n```bash\n$ npm run lint\n```\n\nIn order to lint and fix the code:\n\n```bash\n$ npm run lint:fix\n```\n\nThere are also the `:source` and `:test` suffix after `lint` in order to lint only the source code or the test code.\n\n### Transpile\n\nTo transpile the source code:\n\n```bash\n$ npm run transpile\n```\n\nThe `source` folder will be transpiled in the `dist` folder. Also the `type declarations` will be generated.\n\n### Test\n\n**Note: Running tests will delete permanently your MongoDB data. Do not do it if you have important data on it.**\n\nAfter having transpiled the code, run:\n\n```bash\n$ npm test\n```\n\nin order to run the tests with `mocha`.\n\nIf a coverage report is to be generated, run:\n\n```bash\n$ npm run nyc\n```\n\n### Bundle\n\n```bash\n$ npm run bundle\n```\n\nThe `source` folder will be compiled in the `bundled` folder. It will contain the bundled `lib/index.js`, `lib/index.d.ts` and `bin/index.js` files.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feuberdeveloper%2Fmongo-cleaner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feuberdeveloper%2Fmongo-cleaner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feuberdeveloper%2Fmongo-cleaner/lists"}