lib/streamify.js
function streamer(error, output, callback)
{
  if (error && !this.error)
  {
    this.error = error;
    this.pause();
    this.emit('error', error);
    // send back value only, as expected
    callback(error, output && output.value);
    return;
  }

  // stream stuff
  this.push(output);

  // back to original track
  // send back value only, as expected
  callback(error, output && output.value);
}
function streamer(error, output, callback)
{
  if (error && !this.error)
  {
    this.error = error;
    this.pause();
    this.emit('error', error);
    // send back value only, as expected
    callback(error, output && output.value);
    return;
  }

  // stream stuff
  this.push(output);

  // back to original track
  // send back value only, as expected
  callback(error, output && output.value);
}
function streamer ( error , output , callback ) { if ( error && ! this . error ) { this . error = error ; this . pause ( ) ; this . emit ( 'error' , error ) ; // send back value only, as expected callback ( error , output && output . value ) ; return ; } // stream stuff this . push ( output ) ; // back to original track // send back value only, as expected callback ( error , output && output . value ) ; }
Stream wrapper for iterator callback

@this  ReadableAsyncKit#
@param {mixed} error - error response
@param {mixed} output - iterator output
@param {function} callback - callback that expects iterator results
Stream wrapper for iterator callback