str

streamstepper

pipe multiple streams sequentially into one

Showing:

Popularity

Downloads/wk

0

GitHub Stars

0

Maintenance

Last Commit

7yrs ago

Contributors

0

Package

Dependencies

1

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

#Streamstepper

This module is a very simple stream utility. How do you read multiple streams sequentially into one stream? With stream stepper! ;-)

Just have a look at the exmaple:

var fs = require('fs'),
Streamstepper = require('./index')

var newStepper = new Streamstepper([
  fs.createReadStream('testfile1.txt'),
  fs.createReadStream('testfile2.txt'),
  fs.createReadStream('testfile3.txt')
])

var count = 0
newStepper.on('data', function (d) {
  count += (d+'').length
})
newStepper.on('end', function () {
  console.log('count: %s', count)
})

What this example does: creates 3 read-streams but starts consuming it sequentially thus avoiding too many opened pipes!

npm i streamstepper

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial