Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
@karmaniverous/dirtree
Advanced tools
Parses a directory into a nicely-formatted ASCII tree. Includes a CLI.
Parses a directory into a nicely-formatted ASCII tree. Includes a CLI.
To install:
npm install @karmaniverous/dirtree
To import:
import { dirtree } from '@karmaniverous/dirtree`;
PS C:\> dirtree -d src -a size
└─ src
├─ cli
│ └─ index.mjs: 1344
└─ export
├─ dirtree
│ ├─ dirtree.mjs: 2045
│ └─ dirtree.test.mjs: 303
└─ index.mjs: 73
Usage: dirtree [options]
Options:
-a, --attribute <string> Decorate files with an fs.Stats attribute. https://nodejs.dev/en/api/v19/fs/#fsstats
-n, --depth <int> Limit the tree to this depth. Default is unlimited.
-d, --dir <string> Path to starting directory. Defaults to current working directory.
-e, --exclude <string> RegExp pattern to exclude paths from tree.
-h, --help display help for command
string
Extracts an ascii tree representing the file structure under a directory path.
Kind: global function
Returns: string
- ASCII tree.
Param | Type | Description |
---|---|---|
[options] | Object | Options object. |
[options.attribute] | string | Decorate files with an fs.Stats attribute. https://nodejs.dev/en/api/v19/fs/#fsstats |
[options.debug] | boolean | Log intermediate steps to console. |
[options.depth] | number | Limit the tree to this depth. Default is unlimited. |
[options.dir] | string | Path to starting directory. Defaults to current working directory. |
[options.exclude] | RegExp | RegExp pattern to exclude paths from tree. |
See more great templates and other tools on my GitHub Profile!
FAQs
Parses a directory into a nicely-formatted ASCII tree. Includes a CLI.
We found that @karmaniverous/dirtree demonstrated a not healthy version release cadence and project activity because the last version was released 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
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.