Skip to content

util: add util.table()#63984

Open
watilde wants to merge 1 commit into
nodejs:mainfrom
watilde:util-table
Open

util: add util.table()#63984
watilde wants to merge 1 commit into
nodejs:mainfrom
watilde:util-table

Conversation

@watilde

@watilde watilde commented Jun 18, 2026

Copy link
Copy Markdown
Member

Add util.table(tabularData[, properties][, options]), which renders tabular data with the same layout as console.table but returns it as a string instead of writing to a stream. This is useful for logging, writing to a file, or building output without a console.

The row-building logic is extracted from console.table into a shared internal module so both APIs produce identical output.

Add `util.table(tabularData[, properties][, options])`, which renders
tabular data with the same layout as `console.table` but returns it as
a string instead of writing to a stream. This is useful for logging,
writing to a file, or building output without a console.

The row-building logic is extracted from `console.table` into a shared
internal module so both APIs produce identical output.

Signed-off-by: Daijiro Wachi <daijiro.wachi@gmail.com>
@nodejs-github-bot nodejs-github-bot added console Issues and PRs related to the console subsystem. needs-ci PRs that need a full CI run. util Issues and PRs related to the built-in util module. labels Jun 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

console Issues and PRs related to the console subsystem. needs-ci PRs that need a full CI run. util Issues and PRs related to the built-in util module.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants