# fltrjson

> mongodb like json query language

Latest version **0.2.2** (published 2017-02-14) · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.2 |
| Published | 2017-02-14 |
| First published | 2016-04-03 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=2.0.0 |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Tobias Subklewe |
| Maintainers | gentletee |
| Keywords | filter, json, query, mongodb |

## Links

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

## Dependencies (1)

- [moment](https://npm.io/package/moment.md) ^2.17.1

## Recent versions

- 0.2.2 (latest) — 2017-02-14
- 0.2.1 — 2017-02-13
- 0.2.0 — 2017-02-13
- 0.1.1 — 2016-04-03
- 0.1.0 — 2016-04-03

## README

```js
let fltr = require('fltrjson')
```

## Installation

```bash
$ npm install fltrjson
```

## Features

  * Filter JSON with MongoDB like Queries
  * Promised Matching
  * Streamed Matching
  * Numbers
  * Strings
  * Dates
  * Arrays
  * Objects

## Examples
### Simple Promised Matching
```js
let fltr = require('fltrjson');

let query = {
	count: {
		$gt: 3,
		$lt: 9
	}
};

let json = { count: 6 };

new fltr(query).match(json)
	.then(()=> {
		console.log('Yay!');
	})
	.catch(()=> {
		console.err('Oh noes!');
	});
//=> Yay!
```
### Simple Stream  Matching
```js
let fs   = require('fs'),
	fltr = require('fltrjson');

let query = {
	count: {
		$gt: 3,
		$lt: 9
	}
};

let logFileStream = fs.createReadStream('/var/log/myLogFile.log');

new fltr(query).on('match', (match)=> {
	if (match) {
		console.log('Yay!');
	}
}).match(logFileStream);
```

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