Adding new repl options

This commit is contained in:
Anthony Laibe 2018-09-11 09:27:19 +01:00
parent 4e3e27df6c
commit e08892664f

View File

@ -3,7 +3,10 @@ const vm = require('vm');
class RunCode {
constructor({logger}) {
this.logger = logger;
this.context = Object.assign({}, {global, console, exports, require, module, __filename, __dirname});
this.context = Object.assign({}, {
global, console, exports, require, module, __filename, __dirname, process,
setTimeout, setInterval, clearTimeout, clearInterval
});
}
doEval(code) {