node package manager
It’s your turn. Help us improve JavaScript. Take the 2017 JavaScript Ecosystem Survey »


Jail Guard

An attempt to Execute User Provided JavaScript securly. Jail Guard,

  • runs scripts on a seperate process
  • detects never ending loops
  • blocks eval, execScript, setTimeout and setInterval
  • blocks Function Constructor


sudo npm install jailguard -g


var jailguard = require('jailguard');
var assert = require('assert');

var jg = jailguard.create();
var env = {aa: 0};
var code = "aa = 100;", env, function(err) {
	assert.equal(100, env.aa);