split stream into line sized chunks
The lino Node.js module splits streams into line sized chunks.
var lino = require'lino'var lines = linolineson'readable'console.log'%s' linesreadlineswrite'Chunks are buffered until the 'lineswrite'the first newline character 'lineswrite'is encountered.\n'lineswrite'No characters are removed.\n'lineswrite'At the end the buffer 'linesend'is flushed.'
lino exports a single function that returns a Transform stream. This duplex stream splits its inputs at line breaks to output line sized chunks.
With npm do:
$ npm install lino