Browse Source

Replaced `compile` with `constructor` call

sanex3339 4 năm trước cách đây
mục cha
commit
80a122b763

+ 4 - 0
CHANGELOG.md

@@ -1,5 +1,9 @@
 Change Log
 
+v1.2.1
+---
+* Support of old browsers when `selfDefending` is enabled. https://github.com/javascript-obfuscator/javascript-obfuscator/issues/615
+
 v1.2.0
 ---
 * Conditional comments will be removed from the code after obfuscation. https://github.com/javascript-obfuscator/javascript-obfuscator/issues/641

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/index.browser.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/index.cli.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/index.js


+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "javascript-obfuscator",
-  "version": "1.2.0",
+  "version": "1.2.1",
   "description": "JavaScript obfuscator",
   "keywords": [
     "obfuscator",

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

@@ -9,7 +9,7 @@ export function SelfDefendingTemplate (): string {
             const test = function () {
                 const regExp = test
                     .constructor('return /" + this + "/')()
-                    .compile('^([^ ]+( +[^ ]+)+)+[^ ]}');
+                    .constructor('^([^ ]+( +[^ ]+)+)+[^ ]}');
                 
                 return !regExp.test({selfDefendingFunctionName});
             };

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác