浏览代码

Updated self defending template #5

sanex 3 年之前
父节点
当前提交
d6d46bef37

+ 1 - 0
.gitignore

@@ -11,3 +11,4 @@ npm-debug.log
 /tmp
 /test/benchmark/**/**
 *dockerfile
+/test*.js

文件差异内容过多而无法显示
+ 0 - 0
dist/index.browser.js


文件差异内容过多而无法显示
+ 0 - 0
dist/index.cli.js


文件差异内容过多而无法显示
+ 0 - 0
dist/index.js


+ 1 - 1
src/custom-code-helpers/self-defending/templates/SelfDefendingNoEvalTemplate.ts

@@ -9,7 +9,7 @@ export function SelfDefendingNoEvalTemplate (): string {
             {globalVariableTemplate}
         
             return that
-                .RegExp('(.*)+.*}')
+                .RegExp('((.*)+)+$')
                 .test({selfDefendingFunctionName});
         });
         

+ 1 - 1
src/custom-code-helpers/self-defending/templates/SelfDefendingTemplate.ts

@@ -9,7 +9,7 @@ export function SelfDefendingTemplate (): string {
             return {selfDefendingFunctionName}
                 .constructor('return /" + this + "/')
                 .call()
-                .constructor('(.*)+.*}')
+                .constructor('((.*)+)+$')
                 .test({selfDefendingFunctionName});
         });
         

部分文件因为文件数量过多而无法显示