template-stream
Template Stream
Install
npm install template-stream
Usage
Building your own streams
tStream = 'template-stream' jsonOut: 'auto' filterErrors: false appendString: '' // default configtStream
Config
jsonOut
json true/false string output down stream. 'auto' = same form as upstream
filterErrors
false=json parse errors emit the error, true=json parse errors are silently filtered
Statistics
// allconsole // { processed: 942, filtered: 18, badJson: 2 } // particular statisticconsole // 18 // your own statisticstStreamconsole // { processed: 942, filtered: 18, badJson: 2, myStat: 1 }