Sha256: f62f76266f0ddedfa74ceac139789ccca5c0255398d96fda1bd2f8ab29a8f909

Contents?: true

Size: 1.04 KB

Versions: 6

Compression:

Stored size: 1.04 KB

Contents

(function(program, execJS) { execJS(program) })(function(global, process, module, exports, require, console, setTimeout, setInterval, clearTimeout, clearInterval, setImmediate, clearImmediate) { #{source}
}, function(program) {
  var __process__ = process;

  var printFinal = function(string) {
    process.stdout.write('' + string, function() {
      __process__.exit(0);
    });
  };
  try {
    delete this.process;
    delete this.console;
    delete this.setTimeout;
    delete this.setInterval;
    delete this.clearTimeout;
    delete this.clearInterval;
    delete this.setImmediate;
    delete this.clearImmediate;
    result = program();
    this.process = __process__;
    if (typeof result == 'undefined' && result !== null) {
      printFinal('["ok"]');
    } else {
      try {
        printFinal(JSON.stringify(['ok', result]));
      } catch (err) {
        printFinal(JSON.stringify(['err', '' + err, err.stack]));
      }
    }
  } catch (err) {
    this.process = __process__;
    printFinal(JSON.stringify(['err', '' + err, err.stack]));
  }
});

Version data entries

6 entries across 6 versions & 3 rubygems

Version Path
execjs-2.10.0 lib/execjs/support/node_runner.js
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/execjs-2.9.1/lib/execjs/support/node_runner.js
tinymce-rails-7.1.2 vendor/bundle/ruby/3.3.0/gems/execjs-2.9.1/lib/execjs/support/node_runner.js
execjs-2.9.1 lib/execjs/support/node_runner.js
execjs-2.9.0 lib/execjs/support/node_runner.js
execjs-2.8.1 lib/execjs/support/node_runner.js