Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
@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.
The npm package @karmaniverous/dirtree receives a total of 6 weekly downloads. As such, @karmaniverous/dirtree popularity was classified as not popular.
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
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.