Node.js streaming filter that implements MongoDB query language for filtering JSON documents in a pipeline. Stable version 0.2.0, with low release cadence (last release years ago). Differentiators: lightweight, streams-based, supports full MongoDB query syntax including $and, $or, $gt, $in, etc. Use with any readable stream of JSON objects, commonly paired with levelup/leveldb. Alternatives like mongodb native driver are heavier and not stream-oriented.
npm install jsonqueryNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a readable stream of objects, pipes through jsonquery filter, and logs matched documents.
Ensure both input and output streams use objectMode: true.
For modern MongoDB query needs, consider using the official mongodb driver or a more maintained library.
Ensure source stream outputs valid JavaScript objects with expected property types.
Always call jsonquery(queryObject) where queryObject is a valid MongoDB query object.
Call input.push(null) only after all data has been enqueued, not before.
Assign jsonquery(query) to a variable first: var filter = jsonquery(query); source.pipe(filter);
No dependency data recorded yet.