lino

split stream into line sized chunks

lino - split stream into line sized chunks

The lino Node.js module splits streams into line sized chunks.

var lino = require('lino')
 
var lines = lino()
lines.on('readable', function () {
  console.log('%s', lines.read())
})
lines.write('Chunks are buffered until the ')
lines.write('the first newline character ')
lines.write('is encountered.\n')
lines.write('No characters are removed.\n')
lines.write('At the end the buffer ')
lines.end('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

MIT License