Skip to content

Commit

Permalink
feat: add console.inspect() API for inspecting JavaScript Objects.
Browse files Browse the repository at this point in the history
  • Loading branch information
andycall committed Nov 26, 2024
1 parent d03f421 commit c2eecdb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions bridge/polyfill/src/console.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,13 @@ export const console = {
log(...args: any) {
printer(logger(arguments));
},
inspect(...args: any) {
var result = [];
for (var i = 0; i < arguments.length; i++) {
result.push(formatter(arguments[i], Number.MAX_VALUE, []));
}
printer(result.join(SEPARATOR));
},
info(...args: any) {
printer(logger(arguments), 'info');
},
Expand Down

0 comments on commit c2eecdb

Please sign in to comment.