stream-grep

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

npm install stream-grep
1 downloads in the last day
1 downloads in the last week
14 downloads in the last month

stream-grep

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

build status

Installation

  npm install stream-grep

Usage


var streamGrep = require('..')
  , fs = require('fs')

streamGrep(fs.createReadStream(__filename), [/create/])
  .on('found', function (term, line) {
    console.log('Found', term, 'line', line)
  })
  .on('end', function(found) {
    console.log('Terms found', found)
  })

Credits

Paul Serby follow me on twitter @serby

Licence

Licensed under the New BSD License

npm loves you