flatten-stream
v0.0.1
Published
An implementation of a node transform stream which flattens streams of multidimensional arrays
Downloads
1
Maintainers
Readme
flatten-stream is a lightweight node.js transform stream which flattens a stream of objects.
Basic Usage
const
streamify=require('stream-array'),
FlatStreamTransformer=require('./index.js')
const array=[
[
{key:'value1'},
[
{key:'value2'},
{key:'value3'}
],
],
[
{key:'value4'}
],
[
{key:'value5'},
{key:'value6'},
]
];
streamify(array)
.pipe(new FlatStreamTransformer());
//=>
//[
// {key:'value1'},
// {key:'value2'},
// {key:'value3'},
// {key:'value4'},
// {key:'value5'},
// {key:'value6'}
//]