Socket
Book a DemoInstallSign in
Socket

fgrep

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fgrep

Search for a given string in specified files.

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

fgrep

Search for a given string in specified files.

As requested by David Herman

USAGE

var fgrep = require('fgrep')

// options:
// - limit: defaults to 10, how many files to read at once
// - nocase: defaults false, do a case-insensitive search
fgrep(string, filenames, options)
  .on('data', function (match) {
    // match is { filename, linenumber, line }
  })
  .on('end', function () {
    // done matching
  })

// or if you prefer being classy, but it's the same thing
var FGrep = require('fgrep')
var fg = new FGrep(string, filenames, limit)

FAQs

Package last updated on 10 Mar 2015

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