Transform stream which emits each part and pushes object with part
npm install each-partTransform stream which emits each part and pushes object with part.
Uses newline and carriage return for default delimiter (one or both in either order).
``sh`
npm install each-part --save
`coffeescript
buildEach = require 'each-part'
object by default, which contains string and delimeachLine.on 'part', (part, delim) ->
# do something with the part.
# when readableObjectMode is true, the default, then part is an objectstring
# with two properties: and delimpart
# when it's not true (you specify it as false in options) then is thedelim
# string. The second arg is always
eachLine.on 'error', (error) -> # do something with the error...
eachLine.on 'finish', (error) -> # all done...
someStream.pipe(eachLine)
to the next stream, set readableObjectMode to false: