2.1.0 • Published 8 years ago

grepr v2.1.0

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

grepr

Installation

npm install grepr

Usage

Function signature is function(string,dir,callback) where:

  • string: is the string to search;
  • dir: is directory where the search starts;
  • callback: is a function of type function(file,indices,lines) where file is the complete file path where the input string has been found, indices is an array of line index and lines is the array of lines containing the string.

Callback is called only on those files containing at least one occurrence of the input string.

For example this call search in the current directory the word npm:

var grepr = require('grepr');

grepr("npm","./", function(file,indices,lines){
	console.log("FOUND in "+file);
	console.log("INDICES\n"+indices);
	console.log("LINES\n"+lines);
});

Tools

Created with Nodeclipse (Eclipse Marketplace, site)

Nodeclipse is free open-source project that grows with your contributions.

2.1.0

8 years ago

2.0.1

8 years ago

1.3.5

8 years ago

1.3.4

8 years ago

1.3.3

8 years ago

1.3.2

8 years ago

1.3.1

8 years ago

1.3.0

8 years ago

1.2.1

8 years ago

1.2.0

8 years ago

1.1.0

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago