Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/heapwolf/through2-join

Produce a stream of intersecting data of two or more delimited json streams
https://github.com/heapwolf/through2-join

Last synced: 25 days ago
JSON representation

Produce a stream of intersecting data of two or more delimited json streams

Awesome Lists containing this project

README

        

# SYNOPSIS
Produce a stream of intersecting data from two or more delimited json streams.

# EXAMPLE
```js
var join = require('through2-join');
var fs = require('fs');

var s1 = fs.createReadStream('./1.json');
var s2 = fs.createReadStream('./2.json');
var s3 = fs.createReadStream('./3.json');

join(function(chunk, enc, cb) {

if (chunk.number > 50) {
cb(null, chunk);
}
else {
cb();
}

}).on(s1, s2, s3).pipe(process.stdout);
```

Without a through transform might be useful too.
```js
join().on(s1, s2, s3).pipe(process.stdout);
```