ascii-table
ascii-table copied to clipboard
Remove the concept of heading in favour of a break
There is no need of having the entire concept of heading.
setHeading(heading, [...])
setHeadingAlign(direction)
setHeadingAlignLeft()
setHeadingAlignCenter()
CLI is non-interactive, therefore differentiating between a header and a regular row does not have value, i.e. user can set headings using a regular row at the beginning of the table.
Instead, I propose that a new method addBreak
is added, that would generate that line that separates the main content from the header.
@gajus Agreed, I like this idea quite a bit.
The break method will be added, but the concept of a heading will remain. There are other users of this library that are in favor of the automatic column-spanning of a table heading.
This may be abstracted in the future to something more generic, but until then the heading remains.
Those methods listed will eventually be removed, in favor of a single configuration method.