{"id":13527409,"url":"https://github.com/simonecorsi/mongodb-query-validator","last_synced_at":"2026-01-27T09:17:57.272Z","repository":{"id":232965028,"uuid":"785665820","full_name":"simonecorsi/mongodb-query-validator","owner":"simonecorsi","description":"✅ Validate your MongoDB queries before executing them","archived":false,"fork":false,"pushed_at":"2025-06-09T11:41:07.000Z","size":1207,"stargazers_count":2,"open_issues_count":7,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-09T12:41:16.149Z","etag":null,"topics":["javascript","mongodb","nodejs","query-validation","query-validator","typescript","validation"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simonecorsi.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-12T11:11:01.000Z","updated_at":"2025-06-09T11:41:01.000Z","dependencies_parsed_at":"2024-06-04T10:58:07.954Z","dependency_job_id":"5b0c356c-a2ca-4c46-a765-8822010afda8","html_url":"https://github.com/simonecorsi/mongodb-query-validator","commit_stats":null,"previous_names":["simonecorsi/mongodb-query-validator"],"tags_count":5,"template":false,"template_full_name":"simonecorsi/scdev-npm-ts-starter","purl":"pkg:github/simonecorsi/mongodb-query-validator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonecorsi%2Fmongodb-query-validator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonecorsi%2Fmongodb-query-validator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonecorsi%2Fmongodb-query-validator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonecorsi%2Fmongodb-query-validator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simonecorsi","download_url":"https://codeload.github.com/simonecorsi/mongodb-query-validator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonecorsi%2Fmongodb-query-validator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28810475,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T07:41:26.337Z","status":"ssl_error","status_checked_at":"2026-01-27T07:41:08.776Z","response_time":168,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["javascript","mongodb","nodejs","query-validation","query-validator","typescript","validation"],"created_at":"2024-08-01T06:01:47.476Z","updated_at":"2026-01-27T09:17:57.256Z","avatar_url":"https://github.com/simonecorsi.png","language":"TypeScript","readme":"# mongodb-query-validator\n\n\u003c!-- ![tests](https://github.com/simonecorsi/mongodb-query-validator/workflows/test/badge.svg) --\u003e\n\n\u003e ✅ Zero Dependency MongoDB Query Operator Validator, why bother the database when you can save network rount-trip and CPU cycles?\n\n## Table of Contents\n\n\u003c!-- toc --\u003e\n\n- [About](#about)\n  * [Benefits](#benefits)\n  * [Use Cases](#use-cases)\n- [Installation](#installation)\n- [Usage](#usage)\n- [Valid query Operators](#valid-query-operators)\n- [Contributing](#contributing)\n- [License](#license)\n- [Contact](#contact)\n\n\u003c!-- tocstop --\u003e\n\n## About\n\nDo you ever find yourself squinting at your MongoDB queries, only to realize you've made a tiny typo that's causing a big headache? We've been there too. That's why we built this nifty little tool – to save you from those pesky errors and wasted database trips.\n\n### Benefits\n\n- **Error-Free Queries**: Say goodbye to query typos and syntax errors. Our validator catches them before they cause any trouble.\n- **Efficiency Boost**: Streamline your development process by validating queries upfront, saving you time and resources.\n\n### Use Cases\n\n- **Production Systems**: Enhance the robustness of production systems by validating queries before executing them in live environments, minimizing downtime and errors.\n- **Development Environments**: Validate queries during development to catch errors early and streamline the debugging process.\n- **Testing Processes**: Integrate query validation into testing pipelines to ensure query correctness and reliability.\n\n\u003c!-- GETTING STARTED --\u003e\n\n## Installation\n\n```sh\nnpm i --save mongodb-query-validator\n# OR\nyarn add mongodb-query-validator\n```\n\n\u003c!-- USAGE EXAMPLES --\u003e\n\n## Usage\n\n```ts\nimport { validateQuery } from './src/index';\n\nconst { isValidQuery } = validateQuery({ myField: { nested: { $gte: 123 } } });\n// isValidQuery = true\n\nconst { isValidQuery, invalidFields } = validateQuery({\n  myField: { nested: { $exist: true } },\n});\n// isValidQuery = false\n// invalidFields = [\"myField.nexted.$exist\"]\n```\n\n## Valid query Operators\n\nYou can find all supported query operator [here](./src/allowed.ts)\n\n## Contributing\n\nProject is pretty simple and straight forward for what is my needs, but if you have any idea you're welcome.\n\nThis projects uses [commitlint](https://commitlint.js.org/) with Angular configuration so be sure to use standard commit format or PR won't be accepted.\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your Changes (`git commit -m 'feat(scope): some AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n\u003c!-- LICENSE --\u003e\n\n## License\n\nDistributed under the MIT License. See `LICENSE` for more information.\n\n\u003c!-- CONTACT --\u003e\n\n## Contact\n\nSimone Corsi - [@im_simonecorsi](https://twitter.com/im_simonecorsi)\n","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonecorsi%2Fmongodb-query-validator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimonecorsi%2Fmongodb-query-validator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonecorsi%2Fmongodb-query-validator/lists"}