Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

asciitable

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

asciitable - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

2

example.js

@@ -7,3 +7,3 @@ #!/usr/bin/env node

skinny: true,
plusIntersections: true,
intersectionCharacter: "x",
columns: [

@@ -10,0 +10,0 @@ {field: "ab", name: "First"},

@@ -17,2 +17,6 @@ var asciitable = module.exports = function asciitable(options, data) {

if (!options.intersectionCharacter) {
options.intersectionCharacter = "-";
}
var columns;

@@ -53,3 +57,3 @@ if (options.columns) {

var separator = [""].concat(columns.map(function(e) { return (new Array(e.width + 1)).join("-"); })).concat([""]).join(options.plusIntersections ? "-+-" : "---");
var separator = [""].concat(columns.map(function(e) { return (new Array(e.width + 1)).join("-"); })).concat([""]).join("-" + options.intersectionCharacter + "-");

@@ -56,0 +60,0 @@ output.push(separator);

{
"name": "asciitable",
"version": "0.0.5",
"version": "0.0.6",
"description": "Render tables in text for tabular terminal fun times!",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -53,2 +53,13 @@ asciitable

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: "@",
});
```

@@ -67,4 +78,4 @@

array.
* _plusIntersections_ - enables using a `+` character at line intersections.
Default is false. Or undefined. Whatever, default is "not enabled".
* _intersectionCharacter_ - changes what character to use at points where lines
intersect. The default is "-".
* _skinny_ - trims the "hanging" characters used in the layout. Saves you two

@@ -82,2 +93,4 @@ horizontal characters!

var options = {
skinny: true,
intersectionCharacter: "x",
columns: [

@@ -106,12 +119,12 @@ {field: "ab", name: "First"},

```
--------------------------------------------------------
| First | Second | Third | Fourth |
--------------------------------------------------------
| a | b | c | |
| asddsfa | sss | zxc | |
| dsgvdgsdvgssdf | x | eryty | |
| m | n | o | p |
| 5 | null | [object Object] | |
| function (){} | | | |
--------------------------------------------------------
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
```

@@ -118,0 +131,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc