
Research
/Security News
Toptal’s GitHub Organization Hijacked: 10 Malicious Packages Published
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
chalk-table
Advanced tools
`chalk-table` is a small terminal table tool that comes with chalk support out of the box.
chalk-table
is a small terminal table tool that comes with chalk support out of the box.
It is a project I forked from @deoxxa's cool asciitable
package. I've added support for chalk and a few extra fixes. In case you're wondering, it can still render simple tables with headings and pretty hyphen/pipe character-based formatting.
npm i chalk-table --save
If you use yarn, you know how it goes. :D
We'll render the following ascii table:
The above example table has been built with the following code:
const chalk = require("chalk");
const chalkTable = require("../src");
const options = {
leftPad: 2,
columns: [
{ field: "id", name: chalk.cyan("ID") },
{ field: "fruit", name: chalk.magenta("Fruit") },
{ field: "veggie", name: chalk.green("Vegetable") },
{ field: "other", name: chalk.yellow("Other") }
]
};
const table = chalkTable(options, [
{ id: 0, fruit: "🍇 Grapes", veggie: "🌽 Maize", other: "🍕 Pizza" },
{ id: 1, fruit: "🍈 Melon", veggie: "🍅 Tomato", other: "🍔 Hamburger" },
{ id: 2, fruit: "🍉 Watermelon", veggie: "🥑 Avocado", other: "🌭 Hot Dog" },
{ id: 3, fruit: "🍊 Tangerine", veggie: "🥦 Broccoli", other: "🥪 Sandwich" },
{ id: 4, fruit: "🍍 Pineapple", veggie: "🥒 Cucumber", other: "🌮 Taco" }
]);
console.log(table);
There are a few key differences from asciitable
's default settings. For instance:
intersectionCharacter
option defaults to a +
character.leftPad
option which allows control over how many padding the table should be from the left of the terminal view.skinny
option.For more documentation or a getting-started guide, head over to asciitable
's repository.
Happy hacking!
FAQs
`chalk-table` is a small terminal table tool that comes with chalk support out of the box.
The npm package chalk-table receives a total of 2,500 weekly downloads. As such, chalk-table popularity was classified as popular.
We found that chalk-table 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
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
Research
/Security News
Socket researchers investigate 4 malicious npm and PyPI packages with 56,000+ downloads that install surveillance malware.
Security News
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.