serby/stream-grep — pull request #1 by tomgco (2014-02-28 15:12:25+00:00)
Title: capture groups: Allowing to run a fn on a capture

Adds capture groups support.

This will allow you to define more complicated logic based on the result of a fn.

The interface is the same however it can now be used as so:

notice the new captured event.

```
//Captured is called for each capturing group
streamGrep(fs.createReadStream(__filename), [/create/], function (value) {
if (value) return true
return false
}).on('captured', function (term, line) {
console.log('Found', term, 'line', line)
})
.on('end', function(found) {
console.log('Terms found', found)
})
```