lib/consumers/v2/wait.js
function throughWithCallback(onData) {

  return through.obj(function (chunk, enc, next) {

    if (onData) {
      onData(null, chunk);
    }

    next(null, chunk);
  });
}
function throughWithCallback(onData) {

  return through.obj(function (chunk, enc, next) {

    if (onData) {
      onData(null, chunk);
    }

    next(null, chunk);
  });
}
function throughWithCallback ( onData ) { return through . obj ( function ( chunk , enc , next ) { if ( onData ) { onData ( null , chunk ) ; } next ( null , chunk ) ; } ) ; }
Create a through stream that simply calls a callback with the contents.
Make sure to also pass the data along so the stream continues.

@private
@static
@since    1.3.0
@category Utilities

@param    {Function}  onData - Callback with an error or parsed JSON.
@returns  {Stream}           - Transform Stream
Create a through stream that simply calls a callback with the contents . Make sure to also pass the data along so the stream continues .