nl_tokens: Function for wrapping default EventEmitter functions to return itself
pl_tokens: function wrapMethods ( self ) { var methods = [ 'on' ] ; var childObjects = [ 'stdin' , 'stdout' , 'stderr' ] ; // Wrap on method methods . forEach ( function ( m ) { var old = self [ m ] ; self [ m ] = function ( ) { old . apply ( self , arguments ) ; return self ; } ; } ) ; // If its a spawn object then wrap child EventEmitters if ( utils . isSpawn ( self ) ) { childObjects . forEach ( function ( <mask> ) { methods . forEach ( function ( m ) { var old = self [ child ] [ m ] ; self [ child ] [ m ] = function ( ) { old . apply ( self [ child ] , arguments ) ; return self ; } ; } ) ; } ) ; } }