I'm working with npm chalk. When I use the rgb function to create colors, easy-table doesn't strip out the color data properly and I'm left with a funky looking table.
Switching over to npm ansi-regex solves the problem.
function length(str) {
var s = str.replace(/\u001b\[\d+m/g, '')
return wcwidth == null ? s.length : wcwidth(s)
}
change to ...
var ansiRegex = require('ansi-regex')
function length(str) {
var s = str.replace(ansiRegex(), '')
return wcwidth == null ? s.length : wcwidth(s)
}
I'm working with npm chalk. When I use the rgb function to create colors, easy-table doesn't strip out the color data properly and I'm left with a funky looking table.
Switching over to npm ansi-regex solves the problem.
change to ...