Socket
Socket
Sign inDemoInstall

tty-table

Package Overview
Dependencies
Maintainers
1
Versions
89
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tty-table - npm Package Compare versions

Comparing version 2.5.6 to 2.5.7

34

examples/truncated-lines.js

@@ -74,1 +74,35 @@ var Chalk = require('chalk');

//test truncation with boolean false
var t4 = Table(header,[],{
borderStyle : 1,
paddingBottom : 0,
headerAlign : "center",
align : "center",
color : "green",
truncate : false
});
t1.push(
["chocolate cake",4.65,"no"]
);
var str4 = t4.render();
console.log(str4);
//test truncation with boolean false
var t5 = Table(header,[],{
borderStyle : 1,
paddingBottom : 0,
headerAlign : "center",
align : "center",
color : "green",
truncate : true
});
t1.push(
["chocolate cake",5.65,"no"]
);
var str5 = t5.render();
console.log(str5);

2

package.json
{
"name": "tty-table",
"version": "2.5.6",
"version": "2.5.7",
"description": "Command line table generator.",

@@ -5,0 +5,0 @@ "main": "src/main.js",

@@ -71,3 +71,7 @@ //let StripAnsi = require("strip-ansi");

//no wrap, truncate
case(typeof config.truncate === 'string' && config.truncate.length > 0):
case((typeof config.truncate === 'string') || config.truncate === true):
if(config.truncate === true){
config.truncate = ''
}
string = Format.handleTruncatedValue(

@@ -74,0 +78,0 @@ string,

@@ -19,1 +19,14 @@

└──────────┴──────────┴──────────┘
┌──────────┬──────────┬──────────┐
│ item │ price │ organic │
├──────────┼──────────┼──────────┤
│ chocolat │ 4.65 │ no │
│ e cake │ │ │
└──────────┴──────────┴──────────┘
┌──────────┬──────────┬──────────┐
│ item │ price │ organic │
├──────────┼──────────┼──────────┤
│ chocolat │ 5.65 │ no │
└──────────┴──────────┴──────────┘
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