Functionutilsv0.7.0
renderTable
Renders a grid of strings as a framed monospace table for Discord output.
Column widths use display width, so emoji, astral, and CJK cells stay aligned. The first row is a header by default with a separator beneath it. Ragged rows are padded to the widest row.
Pass budgetbudget to get one string per page instead of a single string, splitting the body across a character limit and re-emitting the header on each page.
renderTable(
data: readonly (readonly string[])[],
options: PagedTableOptions
): string[]renderTable(
data: readonly (readonly string[])[],
options: PagedTableOptions
): string[]data
options
options: PagedTableOptionsoptions: PagedTableOptionsRendering options, see TableOptionsTableOptions and PagedTableOptionsPagedTableOptions.