
Product
Socket Now Protects the Firefox Extension Ecosystem
Socket is bringing experimental protection to Firefox, scanning 97,000+ extensions in Mozilla's official directory for malware and risky updates.
@jsonjoy.com/fs-print
Advanced tools
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 6,784,167 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.

Product
Socket is bringing experimental protection to Firefox, scanning 97,000+ extensions in Mozilla's official directory for malware and risky updates.

Research
/Security News
Three compromised Rust crates pulled in a malicious dependency that downloaded and executed cross-platform malware during Cargo builds.

Research
/Security News
Socket uncovered 77 linked Firefox extensions, including 40 that steal wallet secrets or credentials and 37 deceptive sports-score shells.