nl_tokens: Process all input from stdin .
pl_tokens: function processStdin ( opts , stylize , callback ) { var leftover = '' ; // Left-over partial line from last chunk. var stdin = process . stdin ; stdin . resume ( ) ; stdin . setEncoding ( 'utf8' ) ; stdin . on ( 'data' , function ( chunk ) { var lines = chunk . split ( / \r\n|\n / ) ; var length = lines . length ; if ( length === 1 ) { leftover += <mask> [ 0 ] ; return ; } if ( length > 1 ) { handleLogLine ( null , leftover + lines [ 0 ] , opts , stylize ) ; } leftover = lines . pop ( ) ; length -= 1 ; for ( var i = 1 ; i < length ; i ++ ) { handleLogLine ( null , lines [ i ] , opts , stylize ) ; } } ) ; stdin . on ( 'end' , function ( ) { if ( leftover ) { handleLogLine ( null , leftover , opts , stylize ) ; leftover = '' ; } callback ( ) ; } ) ; }