Add loop-protect

Remove webworkers
This commit is contained in:
Berkeley Martinez
2015-11-30 14:27:39 -08:00
parent 063d16383f
commit 3a299daa37
15 changed files with 597 additions and 513 deletions

View File

@@ -0,0 +1,17 @@
window.common = (function(global) {
const {
loopProtect,
common = { init: [] }
} = global;
loopProtect.hit = function hit(line) {
var err = `Error: Exiting potential infinite loop at line ${line}.`;
console.error(err);
};
common.addLoopProtect = function addLoopProtect(code = '') {
return loopProtect(code);
};
return common;
})(window);