Documentation home / Native Module API
Native Module API
Formatted Table Rendering
Render arrays as terminal-friendly formatted tables, CSV text or Markdown tables, and inspect row/column counts.
Purpose
Render arrays as terminal-friendly formatted tables, CSV text or Markdown tables, and inspect row/column counts.
Exported API
| Export | Role |
|---|---|
render | render native function or exported value |
csv | csv native function or exported value |
markdown | markdown native function or exported value |
row_count | row count native function or exported value |
column_count | column count native function or exported value |
Usage example
import gs_table;
define headers = ["Name", "Score"];
define rows = [["Alex", 95], ["Sam", 88]];
print(gs_table.render(headers, rows, {title: "Scores", align: ["left", "right"]}));
print(gs_table.csv(headers, rows));
print(gs_table.markdown(headers, rows));render(headers, rows, options) supports title, padding, widths, align, border and header options.
