I want to do some action after streams end. But I need to return result stream which will be end after my actions will be completed (f.e. I create file in first stream and use this file for second stream). It can realise if stream-series will get callback as parameter
var orderedStream = series(streamA, streamB,
function() {
//It will be done after streamA and streamB ended
streamC = new Stream();
streamC.end('c');
return streamC;
}
);
streamB.end('b');
streamA.end('a');
var writer = es.writeArray(function(err, array) {
// Array will be ['a', 'b', 'c'];
});
orderedStream.pipe(writer);
I want to do some action after streams end. But I need to return result stream which will be end after my actions will be completed (f.e. I create file in first stream and use this file for second stream). It can realise if stream-series will get callback as parameter