line-simple-stream
v0.1.0
Published
A simple-stream for lines of a string stream
Downloads
2
Readme
Transform a string simple-stream into a line stream.
var createLineStream = require('line-simple-stream')
var streamUtils = require('simple-stream')
var fsStream = fs.createReadStream('your_file.txt', {encoding: 'utf8'})
// wrap the file stream in a simple-stream
var fileSimpleStream = streamUtils.fromReadableStream(fileStream)
// transform the file stream into a line stream
var lineIterator = createLineIterator(fileIterator)
// print the file
streamUtils.forEach(lineIterator, console.log)(function() {
console.log('done')
})
##Contributors
- Mirko Kiefer (@mirkokiefer)
- Michael Still (@Mitb)