node-based grep utility
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
test Add a basic test Oct 29, 2014
.gitignore Add a proper .gitignore Oct 29, 2014
LICENSE [docs legal] Added readme and MIT License Aug 28, 2011 Make the README a bit more mature Oct 29, 2014

ngrep - asynchronous grep

Copyright (C) 2011 by Maciej Małecki

MIT License (see LICENSE file)

ngrep does what grep does, but asynchronously.


As an executable

npm -g install ngrep

As a library

npm install ngrep


As an executable

To grep directory dir for string foo: ngrep foo dir (it couldn't get any simpler than that).

It can also grep files, but this is just slower than regular grep: ngrep foo file.

As a library

To grep directory dir for RegExp /foo/g:

var ngrep = require('ngrep');
ngrep(/foo/g, 'dir', function (result) {
  console.log(result.file + ': ' + console.context);