
Security News
Ruby's Bundler 4.0.18 Extends Cooldown to bundle lock and bundle cache
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.
@jsonjoy.com/fs-print
Advanced tools
File system tree printer - print a file system structure as a tree
File system tree printer - print a file system structure as a tree.
Provides a simple API to print any filesystem implementing the FsSynchronousApi interface
as a formatted tree structure, useful for debugging and visualization.
npm install @jsonjoy.com/fs-print
import { toTreeSync } from '@jsonjoy.com/fs-print';
import { memfs } from 'memfs';
const { fs } = memfs({
'/readme.md': '...',
'/src/index.ts': '...',
'/src/util.ts': '...',
});
console.log(toTreeSync(fs));
Output:
/
├─ src/
│ ├─ index.ts
│ └─ util.ts
└─ readme.md
You can customize the output with options:
toTreeSync(fs, {
dir: '/src', // Starting directory (default: '/')
depth: 2, // Maximum depth to traverse (default: 10)
separator: '/', // Path separator (default: '/')
tab: ' ', // Indentation string (default: '')
sort: true, // Sort entries (default: true)
});
Apache-2.0
FAQs
File system tree printer - print a file system structure as a tree
The npm package @jsonjoy.com/fs-print receives a total of 8,042,623 weekly downloads. As such, @jsonjoy.com/fs-print popularity was classified as popular.
We found that @jsonjoy.com/fs-print demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers 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
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.

Security News
During a UK cyber test, a Mythos 5 agent used sockpuppets, social engineering, and prompt injection to try to get a maintainer to merge malware.

Company News
Socket is now in the AWS Security Hub Extended plan. Adopt it through AWS, apply committed spend, and block malicious open source packages.