Run dead code removal on following code test.js
var result = ('a' === 'b');
var notTheSame = (result === false);
console.log(notTheSame); // notTheSame is true
with [email protected], [email protected]
uglifyjs -c dead_code=true test.js
will output
WARN: Non-strict equality against boolean: == false [test.js:1,13]
var result=0,notTheSame=result===!1;console.log(notTheSame); // notTheSame is false
Expected output is
var result=!1,notTheSame=result===!1;console.log(notTheSame); // notTheSame is true
Run dead code removal on following code
test.jswith
[email protected],[email protected]will output
Expected output is