RunKit + npm: yuan-sandbox

node v6.17.1
endpointsharetweet
var CE = require("yuan-sandbox"); var Demo = (function () { function Demo(val) { this.value = val; } Demo.prototype.LOG = function (numstr) { if(parseInt(numstr)) console.log(this.value + numstr); else throw new Error("Not A Number"); }; return Demo; }()); var obj = new Demo("Ziyuan is my pride."); var test = "?32"; new CE.Sandbox(obj).Exec(obj.LOG,test); console.log("\n= Section A executed. =\n"); obj.LOG(test); console.log("\n= Section B executed. Program proceeding. =\n"); new CE.Sandbox(obj).Exec(obj.LOG,test); console.log("\n= Section A executed. =\n");
Created from: https://runkit.com/npm/yuan-sandbox
Loading…

no comments

    sign in to comment