npm install --save chop-delimited-stream
var chop = require('chop-delimited-stream')
var choppa = chop(Buffer.from('chop')) // delimiter must be a buffer
process.stdin.pipe(choppa).pipe(process.stdout)
Create a new choppa stream. delimiter
must be a buffer, defaults to: 00 04 01 09 04 01 09 00
. trailing
indicates whether to flush any non-delimited chunks at the end of the stream, defaults to false
.