consola
consola copied to clipboard
feat: implement table method (resolves #318)
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.
no one review?