implement mangle.properties.domprops (#5686)

- support destructuring syntax
- fix corner case with comma operator
This commit is contained in:
Alex Lam S.L
2022-09-29 05:18:04 +01:00
committed by GitHub
parent a570c00251
commit bd5fc4cb1b
15 changed files with 94 additions and 38 deletions

View File

@@ -1737,6 +1737,23 @@ singleton_side_effects: {
node_version: ">=6"
}
mangle_properties: {
mangle = {
properties: {
domprops: true,
},
}
input: {
function f({ p: a }) {
return a;
}
console.log(f({ p: "PASS" }));
}
expect_exact: 'function f({n}){return n}console.log(f({n:"PASS"}));'
expect_stdout: "PASS"
node_version: ">=6"
}
issue_4280: {
options = {
evaluate: true,