File tree Expand file tree Collapse file tree 1 file changed +29
-1
lines changed Expand file tree Collapse file tree 1 file changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -780,7 +780,35 @@ Type: `boolean` Default: `true`
780
780
781
781
Enables additional code obfuscation through simplification.
782
782
783
- ##### :warning : in the future releases obfuscation of ` boolean ` literals (` true ` => ` !![] ` ) will be moved under this option.
783
+ ##### :warning : in future releases obfuscation of ` boolean ` literals (` true ` => ` !![] ` ) will be moved under this option.
784
+
785
+ Example:
786
+ ``` ts
787
+ // input
788
+ if (condition1 ) {
789
+ const foo = 1 ;
790
+ const bar = 2 ;
791
+
792
+ console .log (foo );
793
+
794
+ return bar ;
795
+ } else if (condition2 ) {
796
+ console .log (1 );
797
+ console .log (2 );
798
+ console .log (3 );
799
+
800
+ return 4 ;
801
+ } else {
802
+ return 5 ;
803
+ }
804
+
805
+ // output
806
+ if (condition1 ) {
807
+ const foo = 0x1 , bar = 0x2 ;
808
+ return console [' log' ](foo ), bar ;
809
+ } else
810
+ return condition2 ? (console [' log' ](0x1 ), console [' log' ](0x2 ), console [' log' ](0x3 ), 0x4 ) : 0x5 ;
811
+ ```
784
812
785
813
### ` sourceMap `
786
814
Type: ` boolean ` Default: ` false `
You can’t perform that action at this time.
0 commit comments