code: function gnodeEval (code, context, file, fn) {
    var err, result;
    try {
      // compile JS via facebook/regenerator
      code = regenerator.compile(code, {
        includeRuntime: 'object' !== typeof regeneratorRuntime
      }).code;
    } catch (e) {
      // Treat regenerator errors as syntax errors in repl.
      // A hack to have repl interpret certain js structures correctly.
      e.name = 'SyntaxError'
      err = e;
    }
    try {
      if (this.useGlobal) {
        result = vm.runInThisContext(code, file);
      } else {
        result = vm.runInContext(code, context, file);
      }
    } catch (e) {
      err = e;
    }
  
    fn(err, result);
  }
docs: custom eval() function for the REPL, that first compiles