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

pattern-detector

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pattern-detector

Scan files to find whether certain text pattern exists

  • 0.1.10
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

Scan files to find whether certain text pattern exists.

Installation

npm install -g pattern-detector

Usage


Options:

  -d, --directory [directory path]     root directory to search from, defaults to pwd
  -p, --pattern [text pattern]         text pattern to find
  -e, --exclusion [exclusion pattern]  exclusive file pattern
  -v, --verbose                        verbose output

Example

Find whether require() is called in the current working direcotry, ignoring certain files:

detect -p 'require(.+)' -e 'node_modules|.git|README'

The output will be:

./bin/detector.js line 3
./bin/detector.js line 4
./bin/detector.js line 5

Keywords

FAQs

Package last updated on 10 Jul 2014

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