I have e.g a table like this:
const config = {
columns: {
0: {
alignment: 'left',
width: 10
},
1: {
alignment: 'left',
width: 10,
// optional e.g.: wrapWord: true or truncate: 15
}
},
drawHorizontalLine: (index, size) => index === 0 || index === size ,
}
const data = [['hello', 'world'], ['more', 'from hello world']];
console.log(table(data, config))
Then the size counts the lines together with the lines which get wrapped. Therefore the horizonal line in the last row will not be shown.
Expected behaviour:
Lines will be shown relative to the table row.