
Security News
libxml2 Maintainer Ends Embargoed Vulnerability Reports, Citing Unsustainable Burden
Libxml2’s solo maintainer drops embargoed security fixes, highlighting the burden on unpaid volunteers who keep critical open source software secure.
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,982 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.
Security News
Libxml2’s solo maintainer drops embargoed security fixes, highlighting the burden on unpaid volunteers who keep critical open source software secure.
Research
Security News
Socket investigates hidden protestware in npm packages that blocks user interaction and plays the Ukrainian anthem for Russian-language visitors.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.