Socket
Socket
Sign inDemoInstall

jsonquery

Package Overview
Dependencies
0
Maintainers
2
Versions
17
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    jsonquery

MongoDB query language implemented as a node.js Stream


Version published
Weekly downloads
299
increased by1.36%
Maintainers
2
Install size
21.0 kB
Created
Weekly downloads
 

Readme

Source

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

Keywords

FAQs

Last updated on 18 Dec 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc