Comparing version 2.5.6 to 2.5.7
@@ -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); | ||
{ | ||
"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 @@ | ||
└──────────┴──────────┴──────────┘ | ||
┌──────────┬──────────┬──────────┐ | ||
│[33m item [39m│[33m price [39m│[33m organic [39m│ | ||
├──────────┼──────────┼──────────┤ | ||
│[32m[36m chocolat [32m[39m│[32m 4.65 [39m│[32m no [39m│ | ||
│[32m[36m e cake [32m[39m│ │ │ | ||
└──────────┴──────────┴──────────┘ | ||
┌──────────┬──────────┬──────────┐ | ||
│[33m item [39m│[33m price [39m│[33m organic [39m│ | ||
├──────────┼──────────┼──────────┤ | ||
│[32m[36m chocolat [32m[39m│[32m 5.65 [39m│[32m no [39m│ | ||
└──────────┴──────────┴──────────┘ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1017788
17351