kill-stream
Close a stream when test function returns truthy value
Example
var killStream =var JSONStream =var request =var twoHoursAgo = Date - 3600000{return objcreated_at < twoHoursAgo}var options =url: 'https://api.github.com/repos/joyent/node/events'headers: 'user-agent': 'pug'
killStream(test=fn, includeKill=Boolean)
Closes stream when test
returns truthy value. Pass truthy includeKill
value if you want the last chunk to be included in output.
killStream.obj(test=fn, includeKill=Boolean)
Object
License
MIT