
Product
PHP and Composer Support Is Now in Beta
Socket’s PHP and Composer support is now in Beta for all customers, with PHP reachability analysis generally available.
@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.

Product
Socket’s PHP and Composer support is now in Beta for all customers, with PHP reachability analysis generally available.

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.