khrome / ascii-art

A Node.js library for ansi codes, figlet fonts, ascii art and other ASCII graphics
MIT License
681 stars 287 forks source link

table cuts off column headers when column data is shorter #4

Closed aappddeevv closed 6 years ago

aappddeevv commented 7 years ago

Headers are cut short when the data is shorter. So if the header is "Header" but all the data for that column is only 2 characters, the header will cut short to "He".

khrome commented 7 years ago

Try the changes on HEAD (just clone the repo). I've got some 256 color changes brewing, plus my color FN isn't stable, so I'm not ready to push it to NPM... but .table() now has 2 options to help out:

Let me know if this works!

khrome commented 6 years ago

1.4.3 makes these changes live