Skip to content
Split a readable stream by newline characters
JavaScript
Latest commit fd36bbb Aug 11, 2014 @nisaacson 0.1.4
Failed to load latest commit information.
test
.gitignore
.jshintrc Add: .jshintrc. Jan 8, 2014
.travis.yml Remove 0.8 support Jan 7, 2014
README.md Update README.md Apr 30, 2014
index.js Use os.EOL instead of \n Jul 29, 2014
makefile First commit Jan 7, 2014
package.json 0.1.4 Aug 11, 2014

README.md

linerstream

Split a readable stream by newline characters

NPM

Build Status Dependency Status Code Climate

Installation

npm install -S linerstream

Usage

Create an instance of linestream and pipe a readable stream into that instance

var Linerstream = require('linerstream')
// splitter is an instance of require('stream').Transform
var opts = {
  highWaterMark: 2
}
var splitter = new Linerstream(opts) // opts is optional

var readStream = fs.createReadStream('/file/with/line/breaks.txt')
var lineByLineStream = readStream.pipe(splitter)
lineByLineStream.on('data', function(chunk) {
  console.dir(chunk)  // no line breaks here :)
})
Something went wrong with that request. Please try again.