Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

8
  • Absolutely, by piping all the streams to the combined one, the end event will be invoked multiple times on the latter!! I guess it would be tricky for the component which is demanded to read from that stream... Commented Jul 18, 2015 at 17:32
  • @cswl As I said, I'm not piping whole files to the combined stream. Only some data from the files is written to the combined streams myStream.on('data', myStream.write), so I need to know when to close the combined stream. Commented Jul 18, 2015 at 17:36
  • @cswl thanks, but it looks more complicated, not simpler Commented Jul 19, 2015 at 6:05
  • @kyrylkov. You can just put the classes on a seperate file and load it as a module. Then your whole code becomes after the // Now you can do Commented Jul 19, 2015 at 6:10
  • @cswl Thanks. I upvoted it as an alternative solution, but not the answer. Commented Jul 19, 2015 at 7:09