- Version: 7.1.0
- Platform: Linux 4.8.8-2-ARCH
- Subsystem: REPL
Run the following:
require('repl').start({
eval: function(input, context, filename, cb) {
console.log(input);
cb(null);
}
});
When inside the REPL write function f() {}. The REPL will log var f = function f() {}.
This sort of preprocessing should only happen for the default eval function.
The line where the preprocessing occurs: repl.js#L503
This should probably be moved to inside the defaultEval function.