-
Notifications
You must be signed in to change notification settings - Fork 1
REPL JavaScript
Namek edited this page May 29, 2016
·
2 revisions
This REPL simply takes the input, evaluates it as JavaScript code and prints output.
module.exports.commandLineHandler: {
handleExecution: function(input, utils) {
this.context.output.addInputEntry(input)
this.context.output.addTextEntry("" + eval(input))
}
}Please note, that The Console doesn't need this custom module defining a JavaScript REPL to evaluate JavaScript. By default, if The Console doesn't understand given command it tries to evaluate given input as JavaScript.