Skip to content

Commit

Permalink
feat: support console.info and .debug in javascript engine (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasb authored Mar 22, 2024
1 parent 852729f commit d41f7ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/engine/javascript.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ async function execCode(code) {
function patchConsole(messages) {
const consoleProxy = new Proxy(console, {
get(target, prop) {
if (prop === "log" || prop === "error" || prop === "warn") {
if (prop === "log" || prop === "error" || prop === "warn" || prop === "info" || prop === "debug") {
return (...args) => {
const message = args.map((obj) => stringify(obj)).join(" ");
messages.push(message);
Expand Down

0 comments on commit d41f7ca

Please sign in to comment.