bundler.js
function hookStdout(callback)
{
  process.stdout._oWrite = process.stdout.write;

  // take control
  process.stdout.write = function(string, encoding, fd)
  {
    callback(string, encoding, fd);
  };

  // reverse it
  return function()
  {
    process.stdout.write = process.stdout._oWrite;
  };
}
function hookStdout(callback)
{
  process.stdout._oWrite = process.stdout.write;

  // take control
  process.stdout.write = function(string, encoding, fd)
  {
    callback(string, encoding, fd);
  };

  // reverse it
  return function()
  {
    process.stdout.write = process.stdout._oWrite;
  };
}
function hookStdout ( callback ) { process . stdout . _oWrite = process . stdout . write ; // take control process . stdout . write = function ( string , encoding , fd ) { callback ( string , encoding , fd ) ; } ; // reverse it return function ( ) { process . stdout . write = process . stdout . _oWrite ; } ; }
Hooks into stdout stream
to snitch on passed data

@param   {function} callback - invoked on each passing chunk
@returns {function} - snitching-cancel function
Hooks into stdout stream to snitch on passed data