enhance unsafe_comps (#5510)

This commit is contained in:
Alex Lam S.L
2022-06-12 05:15:43 +01:00
committed by GitHub
parent 139fad0c05
commit 5d69545299
3 changed files with 26 additions and 9 deletions

View File

@@ -818,8 +818,9 @@ to be `false` and all symbol names will be omitted.
- `unsafe` (default: `false`) — apply "unsafe" transformations (discussion below)
- `unsafe_comps` (default: `false`) — compress expressions like `a <= b` assuming
none of the operands can be (coerced to) `NaN`.
- `unsafe_comps` (default: `false`) — assume operands cannot be (coerced to) `NaN`
in numeric comparisons, e.g. `a <= b`. In addition, expressions involving `in`
or `instanceof` would never throw.
- `unsafe_Function` (default: `false`) — compress and mangle `Function(args, code)`
when both `args` and `code` are string literals.