Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Render tables in text for tabular terminal fun times!
asciitable is the result of me extracting some code from another project. It can render simple tables with headings and pretty hyphen/pipe character-based formatting.
Available via npm:
$ npm install asciitable
Or via git:
$ git clone git://github.com/deoxxa/asciitable.git node_modules/asciitable
asciitable
Generates a table! Easy as pie!
var table = asciitable(options, data);
// OR
var table = asciitable(data, options);
// OR
var table = asciitable(data);
// basic table
var table = asciitable([
{a: "a", b: "b", c: "c"},
{a: "asddsfa", b: "sss", c: "zxc"},
{a: "dsgvdgsdvgssdf", b: "x", c: "eryty"},
{a: "m", b: "n", c: "o", d: "p"},
]);
console.log(table);
// pretty table
var table = asciitable([
{a: "a", b: "b", c: "c"},
{a: "asddsfa", b: "sss", c: "zxc"},
{a: "dsgvdgsdvgssdf", b: "x", c: "eryty"},
{a: "m", b: "n", c: "o", d: "p"},
], {
skinny: true,
intersectionCharacter: "@",
});
Arguments
Options
Also see example.js.
var asciitable = require("asciitable");
var options = {
skinny: true,
intersectionCharacter: "x",
columns: [
{field: "ab", name: "First"},
{field: "b", name: "Second"},
{field: "c", name: "Third"},
{field: "de", name: "Fourth"},
],
};
var table = asciitable(options, [
{ab: "a", b: "b", c: "c" },
{ab: "asddsfa", b: "sss", c: "zxc" },
{ab: "dsgvdgsdvgssdf", b: "x", c: "eryty" },
{ab: "m", b: "n", c: "o", de: "p"},
{ab: 5, b: null, c: {}, de: [] },
{ab: function(){}},
]);
console.log(table);
Output:
x----------------x--------x-----------------x--------x
| First | Second | Third | Fourth |
x----------------x--------x-----------------x--------x
| a | b | c | |
| asddsfa | sss | zxc | |
| dsgvdgsdvgssdf | x | eryty | |
| m | n | o | p |
| 5 | null | [object Object] | |
| function (){} | | | |
x----------------x--------x-----------------x--------x
3-clause BSD. A copy is included with the source.
FAQs
Render tables in text for tabular terminal fun times!
The npm package asciitable receives a total of 545 weekly downloads. As such, asciitable popularity was classified as not popular.
We found that asciitable 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
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.