lib/camp.js
function concatStreams(array) {
  var concat = new stream.PassThrough();

  function pipe(i) {
    if (i < array.length - 1) {
      array[i].pipe(concat, {end: false});
      array[i].on('end', function () { pipe(i + 1) });
    } else {
      array[i].pipe(concat);
    }
  }
  if (array.length > 0) {
    pipe(0);
  }

  return concat;
}
function concatStreams(array) {
  var concat = new stream.PassThrough();

  function pipe(i) {
    if (i < array.length - 1) {
      array[i].pipe(concat, {end: false});
      array[i].on('end', function () { pipe(i + 1) });
    } else {
      array[i].pipe(concat);
    }
  }
  if (array.length > 0) {
    pipe(0);
  }

  return concat;
}
function concatStreams ( array ) { var concat = new stream . PassThrough ( ) ; function pipe ( i ) { if ( i < array . length - 1 ) { array [ i ] . pipe ( concat , { end : false } ) ; array [ i ] . on ( 'end' , function ( ) { pipe ( i + 1 ) } ) ; } else { array [ i ] . pipe ( concat ) ; } } if ( array . length > 0 ) { pipe ( 0 ) ; } return concat ; }
Concatenate an array of streams into a single stream.
Concatenate an array of streams into a single stream .