console-grid
Advanced tools
Comparing version 1.0.5 to 1.0.6
@@ -358,10 +358,18 @@ const style = require("./style.js"); | ||
//+1 space | ||
var lenCurrent = this.getCharLength(item) + 1; | ||
var lenCurrent = this.getCharLength(item); | ||
var lenLast = w - lenCurrent; | ||
if (lenLast <= 1) { | ||
return item; | ||
} | ||
//last str overflow | ||
var last = list.join(" "); | ||
last = this.getCharNoColor(last); | ||
var lenLast = w - lenCurrent; | ||
last = " " + this.getCharNoColor(last); | ||
last = last.substr(0, lenLast - 3) + "..."; | ||
item += " " + last; | ||
if (lenLast > 3) { | ||
last = last.substr(0, lenLast - 3) + "..."; | ||
} else { | ||
last = this.getChar(lenLast, "."); | ||
} | ||
item += last; | ||
@@ -368,0 +376,0 @@ //console.log(item); |
{ | ||
"name": "console-grid", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"description": "console log a grid", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -73,3 +73,3 @@ var Grid = require("../lib/index.js"); | ||
name: "Sub Row 2", | ||
value: "s2", | ||
value: "s2s2s2 s", | ||
number: 12, | ||
@@ -76,0 +76,0 @@ }, { |
27672
724