merge-stream-lines
v0.1.8
Published
Merge every line from each stream
Downloads
3
Readme
merge-stream-lines
Merge each line in the multiple streams like below
stream1: 1 / 2 / 3 / 4
stream2: 5 / 6 / 7 / 8
======================
merged : 1 / 5 / 2 / 6 / 3 / 7 / 4 / 8
Usage
import { createMergeStream } from "merge-stream-lines"
// In seqeuntial flat-array
// ex) 1 / 5 / 2 / 6 ...
const sequentialFlatStream = createMergeStream()
sequentialFlatStream(...stream).pipe(process.stdout)
// In seqeuntial flat-array
// ex) [1, 5] / [2, 6] ...
const sequentialObjectArray = createMergeStream()
sequentialObjectArray(...stream).pipe(process.stdout)