Comparing version 2.6.4 to 2.6.5
@@ -29,7 +29,3 @@ var Table = require('../'); | ||
var c = Table(rows); | ||
console.log(c.render()); | ||
//console.log(Table(header2, rows2).render()); | ||
//console.log(Table(header, rows).render()); |
{ | ||
"name": "tty-table", | ||
"version": "2.6.4", | ||
"version": "2.6.5", | ||
"description": "Command line table generator.", | ||
@@ -5,0 +5,0 @@ "main": "src/main.js", |
@@ -237,3 +237,4 @@ let StripAnsi = require("strip-ansi"); | ||
? config.table.header[0][columnIndex] : {}; | ||
result = Format.inferColumnWidth(columnOptions,rows,columnIndex); | ||
let measurableRows = (rows.length) ? rows : config.table.header[0]; | ||
result = Format.inferColumnWidth(columnOptions,measurableRows,columnIndex); | ||
@@ -263,9 +264,9 @@ //add spaces for padding if not centered | ||
prop = prop.toFixed(2)-0.01; | ||
// when process.stdout.columns is 0, width will be negative | ||
if (prop > 0) { | ||
widths = widths.map(function(value){ | ||
return Math.floor(prop*value); | ||
}); | ||
} | ||
// when process.stdout.columns is 0, width will be negative | ||
if (prop > 0) { | ||
widths = widths.map(function(value){ | ||
return Math.floor(prop*value); | ||
}); | ||
} | ||
@@ -272,0 +273,0 @@ } |
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
1162112
51
19219