UNPKG

javascript-obfuscator

Version:
23 lines (18 loc) 619 B
/** * SelfDefendingTemplate. Enters code in infinity loop. * * @returns {string} */ export function SelfDefendingNoEvalTemplate (): string { return ` const {selfDefendingFunctionName} = {callControllerFunctionName}(this, function () { {globalVariableTemplate} const test = function () { const regExp = new that.RegExp('^([^ ]+( +[^ ]+)+)+[^ ]}'); return !regExp.test({selfDefendingFunctionName}); }; return test(); }); {selfDefendingFunctionName}(); `; }