Kuery is a zero-dependency, MongoDB-style in-memory query engine for JavaScript collections. Version 2.0.0 (stable, actively maintained) compiles queries to native closures for performance. Full TypeScript support with type-safe dot-path queries and dual ESM+CJS exports. Key differentiator: AST-based pipeline enabling pre-compilation, inspection, and custom operators — unlike simple filter utilities. Supports comparison, inclusion, logical, and element operators with methods like find, findOne, sort, skip, limit, and test.
npm install kueryNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a Kuery instance with a MongoDB-style query filter, then uses .find(), .sort(), and dot-path queries on a sample collection.
Use Kuery.findOne() for uniqueness assertion, or import standalone findOne from 'kuery/collection' for first-match behavior.
Ensure bundler supports subpath exports, or import from 'kuery' and use Kuery static methods.
Use ESM import or require('kuery').default in CJS.Design queries to be unique (e.g., on _id field) before calling findOne.
Update to bundler that supports subpath exports (Webpack 5+, Vite, etc.) or import from 'kuery' main.
Use 'import { KueryError } from 'kuery'' (named import).Use ESM import or require('kuery').default.No dependency data recorded yet.