split-in-batch
v1.0.0
Published
Break up a stream and reassemble it so that each array is a collection of line. `split-batch` is inspired by [@dominictarr](https://github.com/dominictarr) split module.
Downloads
2
Readme
split-batch
Break up a stream and reassemble it so that each array is a collection of line.
split-batch
is inspired by @dominictarr split module.
Example:
fs.createReadStream(file)
.pipe(splitBatch({matcher: null, mapper: null, maxSizeArrayLength: 100000}))
.on('data', (data) => {
console.log(data);
})
matcher
: split-batch takes the same arguments as string.split except it defaults to '/\r?\n/'.
maxSizeArrayLength
: return array size.