nl_tokens: Captures a specific stream and invokes the specified callback with the text written to the stream instead . It returns a function that can be used to restore the captured stream .
pl_tokens: function captureStream ( name , callback ) { var stream = process [ name ] ; var originalWrite = stream . write ; stream . write = function ( str ) { callback ( name , str ) ; } ; return { restore : function ( ) { stream . <mask> = originalWrite ; } } ; }