logBox
Requires a Node.js runtime ('qsu/node')Prints the given values to the console as a bordered table, one row per argument, so that long or structured values stay readable. The box is sized to the terminal width, and objects are expanded rather than shown as [object Object].
Values wider than the terminal are wrapped, and East Asian characters and emoji are measured by their display width so the borders stay aligned.
Parameters
| Name | Type | Required | Default |
|---|---|---|---|
args | ...any*Any | – | – |
| The values to print. Each one becomes a row. With no arguments, an empty table is printed. | |||
Returns
void
None
Examples
javascript
import { logBox } from 'qsu/node';
logBox([1, 2, 3, 4, 5]);
logBox('hello', { a: 1 });python
logBox([1, 2, 3, 4, 5])
logBox('hello', {'a': 1})Output:
text
┌───┬──────────────────────────────────────────────────────────┐
│ # │ value │
├───┼──────────────────────────────────────────────────────────┤
│ 0 │ [ 1, 2, 3, 4, 5 ] │
└───┴──────────────────────────────────────────────────────────┘