stream-grep

Streaming search for an array of regexs in a given stream, emits event when found.

stream-grep

Streaming search for an array of regexs in a given stream, emits event when found.

  npm install stream-grep
 
var streamGrep = require('..')
  , fs = require('fs')
 
streamGrep(fs.createReadStream(__filename), [/create/])
  .on('found', function (termline) {
    console.log('Found', term, 'line', line)
  })
  .on('end', function(found) {
    console.log('Terms found', found)
  })
 

Paul Serby follow me on twitter @serby

Licensed under the New BSD License