Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

grepr

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grepr

node.js module that implements a recursive grep function.

  • 2.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

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.

Keywords

FAQs

Package last updated on 13 Jun 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc