lib/consumers/v1/wait.js
function wait(stream, onEnd) {

  waitObj(stream, function (err, data) {

    if (err) {
      return onEnd(err);
    }

    return onEnd(null, Buffer.concat(data.map(function (item) {
      return new Buffer(item);
    })));
  });
}
function wait(stream, onEnd) {

  waitObj(stream, function (err, data) {

    if (err) {
      return onEnd(err);
    }

    return onEnd(null, Buffer.concat(data.map(function (item) {
      return new Buffer(item);
    })));
  });
}
function wait ( stream , onEnd ) { waitObj ( stream , function ( err , data ) { if ( err ) { return onEnd ( err ) ; } return onEnd ( null , Buffer . concat ( data . map ( function ( item ) { return new Buffer ( item ) ; } ) ) ) ; } ) ; }
Wait for the contents of a stream.

@private
@deprecated
@static
@since    0.0.1
@category Consumers

@param    {Stream}    stream - Stream that will be read for this function.
@param    {Function}  onEnd  - Callback when the stream has been read completely.
@returns  {undefined}
Wait for the contents of a stream .