National Park of Minnesota
    Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    pattern-detectorpublic

    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

    install

    npm i pattern-detector

    Downloadslast 7 days

    1

    version

    0.1.10

    license

    MIT

    homepage

    github.com

    last publish

    collaborators

    • avatar