Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
A node module for generating a text tree in ASCII
Editing an ASCII tree manually is not easy, the freetree module provides an easy way for creating in-memory tree data structure from simple bullet items. This [ascii-tree](https://github.com/liushuping/ascii-tree module leverages) module leverages freetree and outputs formatted tree in ascii characters.
Prepare an input file (input.txt) using bullets representing a tree e.g.
#root node
##node1
###node11
##node2
and then process the file content with ascii-tree to generate the ascii tree.
var fs = require('fs');
var asciitree = require('ascii-tree');
var str = fs.readFileSync('input.txt', 'utf8');
var tree = asciitree.generate(str);
fs.writeFile('output.txt', tree, 'utf8');
Then the output.txt will have below contents
root node
├─ node1
│ └─ node11
└─ node2
Make sure mocha
is installed globally
npm install mocha -g
Run npm test
to run unit test
ascii-tree uses freetree for creating tree data structure from inputting text
MIT
FAQs
A node module for generating a text tree in ASCII
The npm package ascii-tree receives a total of 2,484 weekly downloads. As such, ascii-tree popularity was classified as popular.
We found that ascii-tree 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.