0.0.0 • Published 13 years ago
join-stream v0.0.0
join-stream
Intersperse stream chunks with separators.
example
var joinStream = require('join-stream');
var split = require('event-stream').split;
process.stdin
.pipe(split())
.pipe(joinStream(','))
.pipe(process.stdout)
;$ echo -e 'abc\ndef\nhi\njkl' | node example/comma.js
abc,def,hi,jklmethods
var joinStream = require('join-stream')joinStream(sep='\n', opts={})
Return a through stream
that inserts the string or buffer separator sep between 'data' chunks.
If opts.end is truthy, insert the separators immediately after 'data' events
are received and add a separator after the last element. Otherwise add the
separators only after the next element has been received and don't add a
separator after the last element.
install
With npm do:
npm install join-streamlicense
MIT
0.0.0
13 years ago
