Skip to content

Commit 53cd6e2

Browse files
committed
feat: crude polyfill for console.table
1 parent c410b21 commit 53cd6e2

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

bundler/modules/globals.cjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ if (process.env.EXODUS_TEST_IS_BROWSER || process.env.EXODUS_TEST_IS_BAREBONE) {
3737
if (!Object.hasOwn(console, type)) continue
3838
console[type] = wrap(console[type].bind(console))
3939
}
40+
41+
// Poor polyfill for console.table that at least prints the results instead of loosing them
42+
console.table = (...args) => console.log(JSON.stringify(args, undefined, 2))
4043
}
4144

4245
if (!console.time || !console.timeEnd) {

0 commit comments

Comments
 (0)