- refactor `screw_ie8` to `ie8` - compact `sourceMap` options - more stringent verification on input `options` - toplevel shorthands - `ie8` - `keep_fnames` - `toplevel` - deprecated `fromString` in `minify()` - `minify()` no longer handles any `fs` operations - unify order of operations for `mangle_properties()` on CLI & API - `bin/uglifyjs` used to `mangle_properties()` before even `Compressor` - `minify()` used to `mangle_properties()` after `Compressor` but before `mangle_names()` - both will now do `Compressor`, `mangle_names()` then `mangle_properties()` - `options.parse` / `--parse` for parser options beyond `bare_returns` closes #96 closes #1366 fixes #124 fixes #263 fixes #379 fixes #423 fixes #576 fixes #737 fixes #958 fixes #1036 fixes #1175 fixes #1220 fixes #1223 fixes #1280
72 lines
1.7 KiB
JavaScript
72 lines
1.7 KiB
JavaScript
typeof_eq_undefined: {
|
|
options = {
|
|
comparisons: true
|
|
}
|
|
input: {
|
|
var a = typeof b != "undefined";
|
|
b = typeof a != "undefined";
|
|
var c = typeof d.e !== "undefined";
|
|
var f = "undefined" === typeof g;
|
|
g = "undefined" === typeof f;
|
|
var h = "undefined" == typeof i.j;
|
|
}
|
|
expect: {
|
|
var a = "undefined" != typeof b;
|
|
b = void 0 !== a;
|
|
var c = void 0 !== d.e;
|
|
var f = "undefined" == typeof g;
|
|
g = void 0 === f;
|
|
var h = void 0 === i.j;
|
|
}
|
|
}
|
|
|
|
typeof_eq_undefined_ie8: {
|
|
options = {
|
|
comparisons: true,
|
|
ie8: true,
|
|
}
|
|
input: {
|
|
var a = typeof b != "undefined";
|
|
b = typeof a != "undefined";
|
|
var c = typeof d.e !== "undefined";
|
|
var f = "undefined" === typeof g;
|
|
g = "undefined" === typeof f;
|
|
var h = "undefined" == typeof i.j;
|
|
}
|
|
expect: {
|
|
var a = "undefined" != typeof b;
|
|
b = void 0 !== a;
|
|
var c = "undefined" != typeof d.e;
|
|
var f = "undefined" == typeof g;
|
|
g = void 0 === f;
|
|
var h = "undefined" == typeof i.j;
|
|
}
|
|
}
|
|
|
|
undefined_redefined: {
|
|
options = {
|
|
comparisons: true
|
|
}
|
|
input: {
|
|
function f(undefined) {
|
|
var n = 1;
|
|
return typeof n == "undefined";
|
|
}
|
|
}
|
|
expect_exact: "function f(undefined){var n=1;return void 0===n}"
|
|
}
|
|
|
|
undefined_redefined_mangle: {
|
|
options = {
|
|
comparisons: true
|
|
}
|
|
mangle = {}
|
|
input: {
|
|
function f(undefined) {
|
|
var n = 1;
|
|
return typeof n == "undefined";
|
|
}
|
|
}
|
|
expect_exact: "function f(n){var r=1;return void 0===r}"
|
|
}
|