const {VM} = require('vm2')

module.exports = {
  js: code => {
    const vm = new VM()
    try {
      return vm.run(code).toString()
    } catch (e) {
      return e.toString()
    }
  },
}

@@ -79,16 +79,46 @@
  new VM(
+%7B timeout: 1000, sandbox: %7B%7D %7D
 )%0A    tr

Add timeout on js repl to preven while true