Skip to content

feat: implement table method (resolves #318) #388

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

JosephAnson
Copy link

This PR introduces a new table method, I chose to support the same api as the browser console.table(): https://developer.mozilla.org/en-US/docs/Web/API/console/table_static. The fancy styling is based around the same output as chrome.

Introduced additional settings for styling similar to the box in the fancy reporter and I've provided tests to try to cover all the possible scenarios.

Features:

  • Can now use .table(data),.table(data, options?), .table(data, columnFilters[], options?)
  • Supports custom column selection
  • Allows customization of border style, border color, header color, and cell padding.
  • Handles edge cases such as empty arrays/objects and primitive values gracefully.
  • Integrates both Fancy and Basic reporters for styled or plain output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant