MongoDB query language for in-memory JavaScript objects. v7.2.1 (stable, actively maintained). Supports query, projection, aggregation pipeline (including accumulators, expressions, window operators, variables like $$ROOT), and update operations. Key differentiator: brings MongoDB Query Language (MQL) to client-side or server-side JS without a database, with lazy data processing, custom equality, and TypeScript types. Updated frequently with MongoDB operator parity.
npm install mingoNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows query with find() and aggregation with custom context. Demonstrates both top-level functions and tree-shakeable operator registration.
Use `import * as mingo from 'mingo'` or import named exports individually.
Use `find(collection, query).all()` or pass options with `cursor: false` if available. Check docs for exact syntax.
Import `Context` from 'mingo/core' and call `ctx.addOperators([...])`. Then pass `{ context: ctx }` to Aggregator or Query constructor.Either import from 'mingo' (which bundles all operators) or register only needed operators via `Context` for tree-shaking. The default module `mingo` already includes all operators, so you don't need to register if you use that.
Import pipeline stages from 'mingo/operators/pipeline' and query operators from 'mingo/operators/query'. For update operators, use 'mingo/operators/update'.
Use `import * as mingo from 'mingo'` or `import { find } from 'mingo'`.If you want all operators, use `import * as mingo from 'mingo'`. If tree-shaking, add the operator via `context.addOperators([$project])` and pass context to the Aggregator/Query constructor.
Ensure you are using mingo v7+ and that `find` returns a Cursor. Alternatively, use `find(..., ..., { cursor: false })` if that option exists (check docs).No dependency data recorded yet.