1.0.0 • Published 4 years ago

split-in-batch v1.0.0

Weekly downloads
1
License
ISC
Repository
-
Last release
4 years ago

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.

1.0.0

4 years ago