# jsonquery

> MongoDB query language implemented as a node.js Stream

Latest version **0.2.0** (published 2018-12-18) · BSD license · 0 weekly downloads

## Install

```sh
npm install jsonquery
pnpm add jsonquery
yarn add jsonquery
bun add jsonquery
```

## Health

**Score 23/100 (F)** — status: abandoned.

Positive: has types package; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2018-12-18 |
| First published | 2013-05-29 |
| Weekly downloads | 0 |
| License | BSD |
| TypeScript types | separate (@types/jsonquery) |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 20.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 49 |
| Author | Eugene Ware |
| Maintainers | eugeneware, nharbour |
| Keywords | json, mongodb, mongo, stream, filter, query, database, levelup, leveldb |

## Links

- npm: https://www.npmjs.com/package/jsonquery
- Repository: https://github.com/eugeneware/jsonquery
- Homepage: https://github.com/eugeneware/jsonquery#readme
- Issues: https://github.com/eugeneware/jsonquery/issues
- npm.io page: https://npm.io/package/jsonquery

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 0.2.0 (latest) — 2018-12-18
- 0.1.8 — 2018-12-18
- 0.1.7 — 2015-01-28
- 0.1.6 — 2015-01-05
- 0.1.5 — 2015-01-05
- 0.1.4 — 2014-05-09
- 0.1.3 — 2013-09-06
- 0.1.2 — 2013-08-14
- 0.1.1 — 2013-08-10
- 0.1.0 — 2013-07-30
- 0.0.6 — 2013-07-28
- 0.0.5 — 2013-07-27
- 0.0.4 — 2013-07-09
- 0.0.3 — 2013-06-11
- 0.0.2 — 2013-05-30
- … 2 more at https://npm.io/package/jsonquery/versions

## 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](https://secure.travis-ci.org/eugeneware/jsonquery.png)](http://travis-ci.org/eugeneware/jsonquery)

## Installation

To install, use npm:

```
$ npm install jsonquery
```

## Examples

Here's an example of usage:

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

---
_Source: https://npm.io/package/jsonquery · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
