
Security News
White House Authorizes Private Companies to Conduct Offensive Cyber Operations
A new federal program will let vetted U.S. cybersecurity firms help investigate and disrupt foreign cybercrime groups under government direction.
@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 8,639,239 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
A new federal program will let vetted U.S. cybersecurity firms help investigate and disrupt foreign cybercrime groups under government direction.

Research
/Security News
The campaign amassed more than 75,000 installs by targeting Russian-speaking users seeking access to blocked services.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.