Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

combinedStream.pipe() not working #1

Open
jasonkuhrt opened this issue Jun 11, 2013 · 5 comments
Open

combinedStream.pipe() not working #1

jasonkuhrt opened this issue Jun 11, 2013 · 5 comments

Comments

@jasonkuhrt
Copy link

The pipe to moo does not work (node 0.10.x).

var pipeline = Combine(foo,bar,zed);
pipeline.pipe(moo);
@dominictarr
Copy link
Owner

can you post runnable code? and is zed a readable stream?

@jasonkuhrt
Copy link
Author

@dominictarr Hm, this contrived test works:

var PS = require('stream').PassThrough;
var sc = require('stream-combiner');
var ps1 = new PS();
var ps2 = new PS();
var ps3 = new PS();
var ps4 = new PS();
var pl = sc(ps1,ps2,ps3);

pl.pipe(ps4);
pl.write('Hungry');

ps4.setEncoding('utf-8');

ps4.on('data', function(string) {
  console.log(string);
});

I must now review my use-case.

@dominictarr
Copy link
Owner

hmm, that would work if you used through instead of passthrough...

if you really want to use stream2, I think this module: https://npmjs.org/package/bun is the same idea as stream-combiner but for streams2.

@jasonkuhrt
Copy link
Author

@dominictarr thanks for the link. I did not know about bun. What do you advocate as the best approach to streams for someone new to them? Asking them not to become familiar and comfortable with the natives seems like a stretch.

@jasonkuhrt
Copy link
Author

@dominictarr bun works so I assume that the issue is simply a node version incompatibility and not a bug in stream-combiner per-se. Feel free to close. You may want to update your readme with support information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants