New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

walk-cli

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

walk-cli

Commandline utility to find files and directories by name, ext or regex. Can be used as a node module as well.

latest
Source
npmnpm
Version
1.2.0
Version published
Maintainers
1
Created
Source

Walk

Commandline utility to find files and directories by name, ext or regex. Can be used as a node module as well.

Installation

npm install -g walk-cli

Usage

walk -h
Usage: walk [options (VAL = y|n)]
  --files VAL, -f VAL      List files? Default y
  --dirs VAL, -d VAL       List directories? Default n
  --recurse VAL, -r VAL    Recurse child directories? Default y
  --symLinks VAL, -s VAL   Recurse symbolic links? Default y
  --name VAL, -n VAL       Only show files matching regex filter. e.g -name ^walk
  --ignore VAL, -i VAL     ignore files or folder matching regex filter. e.g -i '.git|node_modules'
  --ext VAL, -e VAL        Only show files matching extension. e.g -e js
  --tree, -t               Show output as indented tree?
  --help, -h               Show this help menu

Module Usage

var walk = require('walk-cli');

String.prototype.repeat = function(n) {
  return Array(n + 1).join(this);
};

// Example Options
var walkOpts = {
    root: "/Users/Documents/me/code"
    files: true,
    dirs: true,
    recurse: true,
    ext: "js"
}

walk(walkOpts, function(path, name, level) {
  if (walkOpts.tree) {
    return console.log("  ".repeat(level), name);
  } else {
    return console.log(path);
  }
})

Keywords

find

FAQs

Package last updated on 07 Mar 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