Emojis can break the rendering
console-table-printer v2.9.0
const bundle = new Table({
title: 'Bundle (BUNDLENAME)',
columns: [
{ name: 'Weapon' },
{ name: 'Chroma' },
{ name: 'Quality' },
{ name: 'Price' },
],
})
bundle.addRows([
{
Weapon: '👍🏻',
Chroma: '✅',
Quality: 'Deluxe',
Price: '1 775 VP',
},
])
bundle.printTable()
Result:

Very nice catch.
Unfortunately this is a basic limitation. I calculate the character width based on wcwidth.c https://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c
As emojis appeared lot later with a little complicated rules I need to fix this basic algorithm which could be a little difficult. For example some skin tone signs are supposed to be 0 width and at same time could be 1 width if used individually the whole logic is a little complicated. And this whole logic should be fixed in this underlying dependency. https://www.npmjs.com/package/simple-wcswidth
PRs are welcome for any simple wcs width calculation for emojis. This might unfortunately take some time for me to fix in this underlying package. But Im thinking of some custom instruction that can be passed during Table instance creation which the user defines to make this Problem go away in a forced way.
For example new Table({ wcswidth: { '👍🏻': 1, '✅': 2 } }); to make sure the width of those chars to be user defined.
Let me know what you guys think.
I think having it be custom defined is the best method. After all, it not only fixes the issue at hand, it also gives us more customizability.
And/or we can create an object that contains the basic emoji and their widths.
This has been fixed in 2.11.1