0.1.0 • Published 10 years ago

stream-grep v0.1.0

Weekly downloads
22
License
-
Repository
github
Last release
10 years ago

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