jso

jsonquery

MongoDB query language implemented as a node.js Stream

Showing:

Popularity

Downloads/wk

702

GitHub Stars

46

Maintenance

Last Commit

3yrs ago

Contributors

2

Package

Dependencies

0

Size (min+gzip)

1.1KB

License

BSD-2-Clause

Type Definitions

Tree-Shakeable

No?

Categories

Readme

jsonquery

MongoDB query language implemented as a Streaming filter.

This library implements the entire MongoDB query language as a node.js filtering stream;

build status

Installation

To install, use npm:

$ npm install jsonquery

Examples

Here's an example of usage:

var jsonquery = require('jsonquery');

var count = 0;
generator(100) // a readable stream that outputs JSON documents
  .pipe(jsonquery({ val: { $and: [ { $gt: 970 }, { $gt: 950 } ] } })) // filter
  .on('data', function (doc) {
    expect(doc.val).to.be.above(970);
    expect(doc.val).to.be.above(950);
    count++;
  })
  .on('end', function () {
    expect(count).to.equal(2);
  });

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
Pavel HlobilToronto6 Ratings0 Reviews
1 year ago