This is the tracking list of support status of the reversion of compressor options in Terser.
Strike throughmeans the option is invalid, or not possible to be reversed, or out of the scope of this project.- The question mark
?
means the viability of the option is not being thoroughly considered. - We will replicate the behavior of some rules in Terser as they do a great job on readability improvement.
- arguments
- TODO: priority
low
. - We can do the same thing this rule does as some obfuscator might use arguments to obfuscate.
- TODO: priority
- arrows
lebab
'sarrow
.
-
booleans_as_integersa === true
will be converted toa == 1
.- It is risky to reverse a loose equality.
- booleans
un-boolean
-
collapse_vars: Lossy compression. No valuable pattern to be reversed. - comparisons
- computed_props
- TODO:
- conditionals
un-conditionals
-
dead_code -
defaults -
directives -
drop_console -
drop_debugger -
ecma -
evaluate: Lossy compression. -
expression -
global_defs -
hoist_funs -
hoist_props: Lossy compression. -
hoist_vars -
ie8 - if_return
un-conditionals
-
inline - join_vars
un-variable-merging
-
keep_classnames -
keep_fargs -
keep_fnames - keep_infinity
- loops
- TODO: priority
high
. We already covered part of the cases. un-while-loop
.
- TODO: priority
-
module -
negate_iife: No readability improvement. -
passes - properties
un-bracket-notation
-
pure_funcs -
pure_getters -
reduce_funcs -
reduce_vars: Lossy compression. - sequences
un-sequence-expression
-
side_effects -
switches: Lossy compression. -
top_retain -
toplevel -
typeofs: No readability improvement. -
unsafe- It did a great job on readability improvement. And we don't need to reverse it.
-
unsafe_arrowslebab
'sarrow
.- We decided to not replicate the behavior of this rule as it is not safe, and
lebab
'sarrow
is good enough.
-
unsafe_comps: Lossy compression. -
unsafe_Function -
unsafe_math: Lossy compression. -
unsafe_symbols: Lossy compression. -
unsafe_methods: No readability improvement. - unsafe_proto
un-builtin-prototype
-
unsafe_regexp - unsafe_undefined:
un-undefined
-
unused