
Security News
Socket Releases Free Certified Patches for Critical vm2 Sandbox Escape
A critical vm2 sandbox escape can allow untrusted JavaScript to break isolation and execute commands on the host Node.js process.
dir-parser
Advanced tools
Parse a directory and generate it's structure tree.

$ npm install dir-parser -g
$ parse -h
Usage: index [options]
Options:
-V, --version output the version number
-v, --version
-d, --directory [directory] The target directory, default: "./"
-o, --output [output] Parse result output path, default: "./"
-e, --excludes [excludes] Exclude some directories or files by name
-x, --exdPaths [exdPaths] Exclude some directories or files by path
-c, --config [config] Parser config file
-s, --silent Don't print the parse-result in terminal
-n, --noNum Don't show file and directory number
-h, --help output usage information
$ cd your/demo/dir
$ parse
# It will generate a text file: 'dir-info.txt';
# in terminal log:
dir
ββ subdir
β ββ file1.txt
ββ subdir2
β ββ dem1
β β ββ test1.txt
β ββ dem2
ββ README.md
$ parse -e test1 -s
$ cat dir-info.txt
dir
ββ subdir2
β ββ dem1
β β ββ test1.txt
β ββ dem2
ββ README.md
# Usage 01
#Hint: There should no white space in the excludes series!
$ parse -e .git,node_modules -x somedir/somefile
# Usage 01
#Hint: There should no white space in the excludes Array!
$ parse -e ['.git','node_modules'] -x ['somedir/somefile']
# Usage 03
# Parse by a config file >> parser.json
{
"directory": "your/demo/dir",
"output": "your/output/dir",
"excludes": [
".git",
"node_modules"
]
}
$ parse -c ./parser.json
FAQs
Parse a directory and generate it's structure tree.
The npm package dir-parser receives a total of 173 weekly downloads. As such, dir-parser popularity was classified as not popular.
We found that dir-parser demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.Β It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
A critical vm2 sandbox escape can allow untrusted JavaScript to break isolation and execute commands on the host Node.js process.

Research
Five malicious NuGet packages impersonate Chinese .NET libraries to deploy a stealer targeting browser credentials, crypto wallets, SSH keys, and local files.

Security News
pnpm 11 turns on a 1-day Minimum Release Age and blocks exotic subdeps by default, adding safeguards against fast-moving supply chain attacks.