A utility package providing a structured set of constants and helpers for MongoDB query operators. Version 1.0.0 (stable, no active updates). It includes all standard MongoDB query operators ($lt, $gt, $in, $regex, etc.) and supports both ESM and CommonJS. No dependencies. Unlike manual strings, it reduces typos and improves autocomplete. Released as a single static object, not a constructor.
npm install mongodb-query-operatorsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a MongoDB query object using operator constants from the package.
Use QueryOperators.TextOperators.Search instead of QueryOperators['$search'].
Validate queries against the MongoDB documentation or use a schema validator.
Consider using a more actively maintained alternative like 'mongodb' driver's built-in constants.
Use import { QueryOperators } from 'mongodb-query-operators' or const { QueryOperators } = require('mongodb-query-operators').Run npm install mongodb-query-operators and confirm the import string matches 'mongodb-query-operators'.