jsonquery
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/jsonquery package

0.2.0 • Public • Published

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);
  });

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.2.096latest

Version History

VersionDownloads (Last 7 Days)Published
0.2.096
0.1.820
0.1.71
0.1.61
0.1.51
0.1.41
0.1.31
0.1.21
0.1.11
0.1.01
0.0.61
0.0.51
0.0.41
0.0.31
0.0.21
0.0.11
0.0.01

Package Sidebar

Install

npm i jsonquery

Weekly Downloads

131

Version

0.2.0

License

BSD

Unpacked Size

20.6 kB

Total Files

6

Last publish

Collaborators

  • eugeneware
  • nharbour