lib/consumers/v1/forEach.js
function forEachObj(stream, onData, onEnd) {
  var done = _.once(onEnd);

  stream.on('data', onData);
  stream.on('error', done);
  stream.on('end', done);
}
function forEachObj(stream, onData, onEnd) {
  var done = _.once(onEnd);

  stream.on('data', onData);
  stream.on('error', done);
  stream.on('end', done);
}
function forEachObj ( stream , onData , onEnd ) { var done = _ . once ( onEnd ) ; stream . on ( 'data' , onData ) ; stream . on ( 'error' , done ) ; stream . on ( 'end' , done ) ; }
Read the items in a stream.

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

@param    {Stream}    stream - Stream that will be read for this function.
@param    {Function}  onData - Callback for each item in the stream.
@param    {Function}  onEnd  - Callback when the stream has been read completely.
@returns  {undefined}
Read the items in a stream .