# json-mask-stream

> Filter stream that keeps selected JSON object strings that retains selected object structures

Latest version **0.1.2** (published 2014-02-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install json-mask-stream
pnpm add json-mask-stream
yarn add json-mask-stream
bun add json-mask-stream
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.2 |
| Published | 2014-02-26 |
| First published | 2014-02-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 9 |
| Author | angleman |
| Maintainers | angleman |
| Keywords | mask, filter, select, fields, projection, query, json, stream, stream2 |

## Links

- npm: https://www.npmjs.com/package/json-mask-stream
- Repository: https://github.com/angleman/json-mask-stream
- Issues: https://github.com/angleman/json-mask-stream/issues
- npm.io page: https://npm.io/package/json-mask-stream

## Dependencies (2)

- [json-mask](https://npm.io/package/json-mask.md) ~0.2.0
- [readable-stream](https://npm.io/package/readable-stream.md) ~1.0.26

## 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.1.2 (latest) — 2014-02-26
- 0.1.1 — 2014-02-25

## README

<img src="https://raw.github.com/angleman/json-mask-stream/master/logo.jpg" align="right" width="354px" />
# json-mask-stream 

Pass thru specific parts of a JSON object strings in a stream and **preserves the structure of the included elements**. 


## Install

```bash
npm install json-mask-stream
```

## Usage

Sample ```logfile.json``` line:

```js
{"ip": "198.55.125.23", "timestamp":"2014-02-24 10:29:42", "url": "http:\/\/somedomain.com"}
```

```js
var fs             = require('fs');
var logstream      = fs.createReadStream('logfile.json');
var split          = new require('split')();
var JsonMaskStream = require('json-mask-stream');
var maskStream     = new JsonMaskStream('url,timestamp');

logstream
.pipe(split)
.pipe(maskStream)
.pipe(process.stdout) //  {"url": "http:\/\/somedomain.com", "timestamp":"2014-02-24 10:29:42"}
```

## License 

### MIT

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