var x = 123;
ar x = 123
console.log(x);
onsole.log(x)
I believe eval gets called twice in order to determine whether the command should span multiple lines. Rather than overriding eval I tried just listening for the line event emitted by readline. Seems to work for me.
After entering the following lines in the repl:
My
.node_history
looked like this:I believe
eval
gets called twice in order to determine whether the command should span multiple lines. Rather than overridingeval
I tried just listening for theline
event emitted by readline. Seems to work for me.