Skip to content

Commit 1d68464

Browse files
committed
feat: add debug.log method
1 parent 80e1b43 commit 1d68464

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/debug.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ function dump(...data) {
2525
emit(data);
2626
}
2727

28+
function log(...data) {
29+
pos('log', '38;5;243');
30+
// eslint-disable-next-line no-console
31+
console.log.apply(this, data);
32+
}
33+
2834
function halt(...data) {
2935
pos('halt');
3036
emit(data);
@@ -94,12 +100,13 @@ function error(...data) {
94100
}
95101

96102
module.exports = {
103+
log,
97104
pos,
98105
dump,
99106
halt,
100-
stack,
101107
jump,
102-
warning,
108+
stack,
103109
error,
104-
pause
110+
pause,
111+
warning,
105112
};

0 commit comments

Comments
 (0)