file_path
stringlengths
3
280
file_language
stringclasses
66 values
content
stringlengths
1
1.04M
repo_name
stringlengths
5
92
repo_stars
int64
0
154k
repo_description
stringlengths
0
402
repo_primary_language
stringclasses
108 values
developer_username
stringlengths
1
25
developer_name
stringlengths
0
30
developer_company
stringlengths
0
82
crates/swc_ecma_minifier/tests/terser/compress/conditionals/cond_2/output.mangleOnly.js
JavaScript
function e(e, n, f) { if (f) { e = new n(1); } else { e = new n(2); } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/cond_2/output.terser.js
JavaScript
function foo(x, FooBar, some_condition) { x = new FooBar(some_condition ? 1 : 2); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/cond_3/input.js
JavaScript
var FooBar; if (some_condition()) { new FooBar(1); } else { FooBar(2); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/cond_3/output.js
JavaScript
var FooBar; some_condition() ? new FooBar(1) : FooBar(2);
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/cond_3/output.mangleOnly.js
JavaScript
var e; if (some_condition()) { new e(1); } else { e(2); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/cond_3/output.terser.js
JavaScript
var FooBar; some_condition() ? new FooBar(1) : FooBar(2);
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/cond_4/input.js
JavaScript
var do_something; if (some_condition()) { do_something(); } else { do_something(); } if (some_condition()) { side_effects(); } else { side_effects(); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/cond_4/output.js
JavaScript
var do_something; some_condition(), do_something(); some_condition(), side_effects();
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/cond_4/output.mangleOnly.js
JavaScript
var e; if (some_condition()) { e(); } else { e(); } if (some_condition()) { side_effects(); } else { side_effects(); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/cond_4/output.terser.js
JavaScript
var do_something; some_condition(), do_something(); some_condition(), side_effects();
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/cond_5/input.js
JavaScript
if (some_condition()) { if (some_other_condition()) { do_something(); } else { alternate(); } } else { alternate(); } if (some_condition()) { if (some_other_condition()) { do_something(); } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/cond_5/output.js
JavaScript
some_condition() && some_other_condition() ? do_something() : alternate(); some_condition() && some_other_condition() && do_something();
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/cond_5/output.mangleOnly.js
JavaScript
if (some_condition()) { if (some_other_condition()) { do_something(); } else { alternate(); } } else { alternate(); } if (some_condition()) { if (some_other_condition()) { do_something(); } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/cond_5/output.terser.js
JavaScript
some_condition() && some_other_condition() ? do_something() : alternate(); some_condition() && some_other_condition() && do_something();
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/cond_7/input.js
JavaScript
var x, y, z, a, b; if (y) { x = 1 + 1; } else { x = 2; } if (y) { x = 1 + 1; } else if (z) { x = 2; } else { x = 3 - 1; } x = y ? "foo" : "fo" + "o"; x = y ? "foo" : y ? "foo" : "fo" + "o"; if (condition()) { x = 10 + 10; } else { x = 20; } if (z) { x = "fuji"; } else if (condition()) { x = "fu" + "ji"; } else { x = "fuji"; } x = condition() ? "foobar" : "foo" + "bar"; x = y ? a : b; x = y ? "foo" : "fo";
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/cond_7/output.js
JavaScript
var x, y, z, a, b; x = 2; x = 2; x = "foo"; x = "foo"; condition(), x = 20; z || condition(), x = "fuji"; x = (condition(), "foobar"); x = y ? a : b; x = y ? "foo" : "fo";
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/cond_7/output.mangleOnly.js
JavaScript
var o, f, i, e, l; if (f) { o = 1 + 1; } else { o = 2; } if (f) { o = 1 + 1; } else if (i) { o = 2; } else { o = 3 - 1; } o = f ? "foo" : "fo" + "o"; o = f ? "foo" : f ? "foo" : "fo" + "o"; if (condition()) { o = 10 + 10; } else { o = 20; } if (i) { o = "fuji"; } else if (condition()) { o = "fu" + "ji"; } else { o = "fuji"; } o = condition() ? "foobar" : "foo" + "bar"; o = f ? e : l; o = f ? "foo" : "fo";
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/cond_7/output.terser.js
JavaScript
var x, y, z, a, b; x = 2; x = 2; x = "foo"; x = "foo"; x = (condition(), 20); x = (z || condition(), "fuji"); x = (condition(), "foobar"); x = y ? a : b; x = y ? "foo" : "fo";
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/cond_7_1/input.js
JavaScript
var x; if (y) { x = 1 + 1; } else { x = 2; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/cond_7_1/output.js
JavaScript
var x; y, x = 2;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/cond_7_1/output.mangleOnly.js
JavaScript
var e; if (y) { e = 1 + 1; } else { e = 2; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/cond_7_1/output.terser.js
JavaScript
var x; x = (y, 2);
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/cond_8/input.js
JavaScript
var a; a = condition ? true : false; a = !condition ? true : false; a = condition() ? true : false; a = condition ? !0 : !1; a = !condition ? !null : !2; a = condition() ? !0 : !-3.5; if (condition) { a = true; } else { a = false; } if (condition) { a = !0; } else { a = !1; } a = condition ? false : true; a = !condition ? false : true; a = condition() ? false : true; a = condition ? !3 : !0; a = !condition ? !2 : !0; a = condition() ? !1 : !0; if (condition) { a = false; } else { a = true; } if (condition) { a = !1; } else { a = !0; } a = condition ? 1 : false; a = !condition ? true : 0; a = condition ? 1 : 0;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/cond_8/output.js
JavaScript
var a; a = !!condition; a = !condition; a = !!condition(); a = !!condition; a = !condition; a = !!condition(); a = !!condition; a = !!condition; a = !condition; a = !!condition; a = !condition(); a = !condition; a = !!condition; a = !condition(); a = !condition; a = !condition; a = !!condition && 1; a = !condition || 0; a = +!!condition;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/cond_8/output.mangleOnly.js
JavaScript
var i; i = condition ? true : false; i = !condition ? true : false; i = condition() ? true : false; i = condition ? !0 : !1; i = !condition ? !null : !2; i = condition() ? !0 : !-3.5; if (condition) { i = true; } else { i = false; } if (condition) { i = !0; } else { i = !1; } i = condition ? false : true; i = !condition ? false : true; i = condition() ? false : true; i = condition ? !3 : !0; i = !condition ? !2 : !0; i = condition() ? !1 : !0; if (condition) { i = false; } else { i = true; } if (condition) { i = !1; } else { i = !0; } i = condition ? 1 : false; i = !condition ? true : 0; i = condition ? 1 : 0;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/cond_8/output.terser.js
JavaScript
var a; a = !!condition; a = !condition; a = !!condition(); a = !!condition; a = !condition; a = !!condition(); a = !!condition; a = !!condition; a = !condition; a = !!condition; a = !condition(); a = !condition; a = !!condition; a = !condition(); a = !condition; a = !condition; a = !!condition && 1; a = !condition || 0; a = condition ? 1 : 0;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/cond_8b/input.js
JavaScript
var a; a = condition ? true : false; a = !condition ? true : false; a = condition() ? true : false; a = condition ? !0 : !1; a = !condition ? !null : !2; a = condition() ? !0 : !-3.5; if (condition) { a = true; } else { a = false; } if (condition) { a = !0; } else { a = !1; } a = condition ? false : true; a = !condition ? false : true; a = condition() ? false : true; a = condition ? !3 : !0; a = !condition ? !2 : !0; a = condition() ? !1 : !0; if (condition) { a = false; } else { a = true; } if (condition) { a = !1; } else { a = !0; } a = condition ? 1 : false; a = !condition ? true : 0; a = condition ? 1 : 0;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/cond_8b/output.js
JavaScript
var a; a = !!condition; a = !condition; a = !!condition(); a = !!condition; a = !condition; a = !!condition(); a = !!condition; a = !!condition; a = !condition; a = !!condition; a = !condition(); a = !condition; a = !!condition; a = !condition(); a = !condition; a = !condition; a = !!condition && 1; a = !condition || 0; a = +!!condition;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/cond_8b/output.mangleOnly.js
JavaScript
var i; i = condition ? true : false; i = !condition ? true : false; i = condition() ? true : false; i = condition ? !0 : !1; i = !condition ? !null : !2; i = condition() ? !0 : !-3.5; if (condition) { i = true; } else { i = false; } if (condition) { i = !0; } else { i = !1; } i = condition ? false : true; i = !condition ? false : true; i = condition() ? false : true; i = condition ? !3 : !0; i = !condition ? !2 : !0; i = condition() ? !1 : !0; if (condition) { i = false; } else { i = true; } if (condition) { i = !1; } else { i = !0; } i = condition ? 1 : false; i = !condition ? true : 0; i = condition ? 1 : 0;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/cond_8b/output.terser.js
JavaScript
var a; a = !!condition; a = !condition; a = !!condition(); a = !!condition; a = !condition; a = !!condition(); a = !!condition; a = !!condition; a = !condition; a = !!condition; a = !condition(); a = !condition; a = !!condition; a = !condition(); a = !condition; a = !condition; a = !!condition && 1; a = !condition || 0; a = condition ? 1 : 0;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/cond_8c/input.js
JavaScript
var a; a = condition ? true : false; a = !condition ? true : false; a = condition() ? true : false; a = condition ? !0 : !1; a = !condition ? !null : !2; a = condition() ? !0 : !-3.5; if (condition) { a = true; } else { a = false; } if (condition) { a = !0; } else { a = !1; } a = condition ? false : true; a = !condition ? false : true; a = condition() ? false : true; a = condition ? !3 : !0; a = !condition ? !2 : !0; a = condition() ? !1 : !0; if (condition) { a = false; } else { a = true; } if (condition) { a = !1; } else { a = !0; } a = condition ? 1 : false; a = !condition ? true : 0; a = condition ? 1 : 0;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/cond_8c/output.js
JavaScript
var a; a = !!condition; a = !condition; a = !!condition(); a = !!condition; a = !condition; a = !!condition(); a = !!condition; a = !!condition; a = !condition; a = !!condition; a = !condition(); a = !condition; a = !!condition; a = !condition(); a = !condition; a = !condition; a = !!condition && 1; a = !condition || 0; a = +!!condition;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/cond_8c/output.mangleOnly.js
JavaScript
var i; i = condition ? true : false; i = !condition ? true : false; i = condition() ? true : false; i = condition ? !0 : !1; i = !condition ? !null : !2; i = condition() ? !0 : !-3.5; if (condition) { i = true; } else { i = false; } if (condition) { i = !0; } else { i = !1; } i = condition ? false : true; i = !condition ? false : true; i = condition() ? false : true; i = condition ? !3 : !0; i = !condition ? !2 : !0; i = condition() ? !1 : !0; if (condition) { i = false; } else { i = true; } if (condition) { i = !1; } else { i = !0; } i = condition ? 1 : false; i = !condition ? true : 0; i = condition ? 1 : 0;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/cond_8c/output.terser.js
JavaScript
var a; a = !!condition; a = !condition; a = !!condition(); a = !!condition; a = !condition; a = !!condition() || !-3.5; a = !!condition; a = !!condition; a = !condition; a = !!condition; a = !condition(); a = !condition; a = !!condition; a = !condition(); a = !condition; a = !condition; a = !!condition && 1; a = !condition || 0; a = condition ? 1 : 0;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/cond_9/input.js
JavaScript
function f(x, y) { g() ? x(1) : x(2); x ? (y || x)() : (y || x)(); x ? y(a, b) : y(d, b, c); x ? y(a, b, c) : y(a, b, c); x ? y(a, b, c) : y(a, b, f); x ? y(a, b, c) : y(a, e, c); x ? y(a, b, c) : y(a, e, f); x ? y(a, b, c) : y(d, b, c); x ? y(a, b, c) : y(d, b, f); x ? y(a, b, c) : y(d, e, c); x ? y(a, b, c) : y(d, e, f); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/cond_9/output.js
JavaScript
function f(x, y) { g() ? x(1) : x(2); (y || x)(); x ? y(a, b) : y(d, b, c); y(a, b, c); y(a, b, x ? c : f); y(a, x ? b : e, c); x ? y(a, b, c) : y(a, e, f); y(x ? a : d, b, c); x ? y(a, b, c) : y(d, b, f); x ? y(a, b, c) : y(d, e, c); x ? y(a, b, c) : y(d, e, f); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/cond_9/output.mangleOnly.js
JavaScript
function n(f, i) { g() ? f(1) : f(2); f ? (i || f)() : (i || f)(); f ? i(a, b) : i(d, b, c); f ? i(a, b, c) : i(a, b, c); f ? i(a, b, c) : i(a, b, n); f ? i(a, b, c) : i(a, e, c); f ? i(a, b, c) : i(a, e, n); f ? i(a, b, c) : i(d, b, c); f ? i(a, b, c) : i(d, b, n); f ? i(a, b, c) : i(d, e, c); f ? i(a, b, c) : i(d, e, n); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/cond_9/output.terser.js
JavaScript
function f(x, y) { g() ? x(1) : x(2); x, (y || x)(); x ? y(a, b) : y(d, b, c); x, y(a, b, c); y(a, b, x ? c : f); y(a, x ? b : e, c); x ? y(a, b, c) : y(a, e, f); y(x ? a : d, b, c); x ? y(a, b, c) : y(d, b, f); x ? y(a, b, c) : y(d, e, c); x ? y(a, b, c) : y(d, e, f); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/condition_symbol_matches_consequent/input.js
JavaScript
function foo(x, y) { return x ? x : y; } function bar() { return g ? g : h; } var g = 4; var h = 5; console.log(foo(3, null), foo(0, 7), foo(true, false), bar());
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/condition_symbol_matches_consequent/output.js
JavaScript
function foo(x, y) { return x || y; } function bar() { return g || h; } var g = 4; var h = 5; console.log(foo(3, null), foo(0, 7), foo(true, false), bar());
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/condition_symbol_matches_consequent/output.mangleOnly.js
JavaScript
function n(n, r) { return n ? n : r; } function r() { return u ? u : e; } var u = 4; var e = 5; console.log(n(3, null), n(0, 7), n(true, false), r());
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/condition_symbol_matches_consequent/output.terser.js
JavaScript
function foo(x, y) { return x || y; } function bar() { return g || h; } var g = 4; var h = 5; console.log(foo(3, null), foo(0, 7), foo(true, false), bar());
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/delete_conditional_1/input.js
JavaScript
console.log(delete (1 ? undefined : x)); console.log(delete (1 ? void 0 : x)); console.log(delete (1 ? Infinity : x)); console.log(delete (1 ? 1 / 0 : x)); console.log(delete (1 ? NaN : x)); console.log(delete (1 ? 0 / 0 : x));
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/delete_conditional_1/output.js
JavaScript
console.log(!0); console.log(!0); console.log(!0); console.log(!0); console.log(!0); console.log(!0);
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/delete_conditional_1/output.mangleOnly.js
JavaScript
console.log(delete (1 ? undefined : x)); console.log(delete (1 ? void 0 : x)); console.log(delete (1 ? Infinity : x)); console.log(delete (1 ? 1 / 0 : x)); console.log(delete (1 ? NaN : x)); console.log(delete (1 ? 0 / 0 : x));
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/delete_conditional_1/output.terser.js
JavaScript
console.log(!0); console.log(!0); console.log(!0); console.log(!0); console.log(!0); console.log(!0);
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/delete_conditional_2/input.js
JavaScript
console.log(delete (0 ? x : undefined)); console.log(delete (0 ? x : void 0)); console.log(delete (0 ? x : Infinity)); console.log(delete (0 ? x : 1 / 0)); console.log(delete (0 ? x : NaN)); console.log(delete (0 ? x : 0 / 0));
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/delete_conditional_2/output.js
JavaScript
console.log(!0); console.log(!0); console.log(!0); console.log(!0); console.log(!0); console.log(!0);
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/delete_conditional_2/output.mangleOnly.js
JavaScript
console.log(delete (0 ? x : undefined)); console.log(delete (0 ? x : void 0)); console.log(delete (0 ? x : Infinity)); console.log(delete (0 ? x : 1 / 0)); console.log(delete (0 ? x : NaN)); console.log(delete (0 ? x : 0 / 0));
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/delete_conditional_2/output.terser.js
JavaScript
console.log(!0); console.log(!0); console.log(!0); console.log(!0); console.log(!0); console.log(!0);
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/equality_conditionals_false/input.js
JavaScript
function f(a, b, c) { console.log( a == (b ? a : a), a == (b ? a : c), a != (b ? a : a), a != (b ? a : c), a === (b ? a : a), a === (b ? a : c), a !== (b ? a : a), a !== (b ? a : c) ); } f(0, 0, 0); f(0, true, 0); f(1, 2, 3); f(1, null, 3); f(NaN); f(NaN, "foo");
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/equality_conditionals_false/output.js
JavaScript
function f(a, b, c) { console.log( a == (b ? a : a), a == (b ? a : c), a != (b ? a : a), a != (b ? a : c), a === (b ? a : a), a === (b ? a : c), a !== (b ? a : a), a !== (b ? a : c) ); } f(0, 0, 0), f(0, true, 0), f(1, 2, 3), f(1, null, 3), f(NaN), f(NaN, "foo");
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/equality_conditionals_false/output.mangleOnly.js
JavaScript
function o(o, l, n) { console.log(o == (l ? o : o), o == (l ? o : n), o != (l ? o : o), o != (l ? o : n), o === (l ? o : o), o === (l ? o : n), o !== (l ? o : o), o !== (l ? o : n)); } o(0, 0, 0); o(0, true, 0); o(1, 2, 3); o(1, null, 3); o(NaN); o(NaN, "foo");
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/equality_conditionals_false/output.terser.js
JavaScript
function f(a, b, c) { console.log( a == (b ? a : a), a == (b ? a : c), a != (b ? a : a), a != (b ? a : c), a === (b ? a : a), a === (b ? a : c), a !== (b ? a : a), a !== (b ? a : c) ); } f(0, 0, 0), f(0, true, 0), f(1, 2, 3), f(1, null, 3), f(NaN), f(NaN, "foo");
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/equality_conditionals_true/input.js
JavaScript
function f(a, b, c) { console.log( a == (b ? a : a), a == (b ? a : c), a != (b ? a : a), a != (b ? a : c), a === (b ? a : a), a === (b ? a : c), a !== (b ? a : a), a !== (b ? a : c) ); } f(0, 0, 0); f(0, true, 0); f(1, 2, 3); f(1, null, 3); f(NaN); f(NaN, "foo");
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/equality_conditionals_true/output.js
JavaScript
function f(a, b, c) { console.log( a == a, a == (b ? a : c), a != a, a != (b ? a : c), a === a, a === (b ? a : c), a !== a, a !== (b ? a : c) ); } f(0, 0, 0), f(0, true, 0), f(1, 2, 3), f(1, null, 3), f(NaN), f(NaN, "foo");
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/equality_conditionals_true/output.mangleOnly.js
JavaScript
function o(o, l, n) { console.log(o == (l ? o : o), o == (l ? o : n), o != (l ? o : o), o != (l ? o : n), o === (l ? o : o), o === (l ? o : n), o !== (l ? o : o), o !== (l ? o : n)); } o(0, 0, 0); o(0, true, 0); o(1, 2, 3); o(1, null, 3); o(NaN); o(NaN, "foo");
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/equality_conditionals_true/output.terser.js
JavaScript
function f(a, b, c) { console.log( (b, a == a), a == (b ? a : c), (b, a != a), a != (b ? a : c), (b, a === a), a === (b ? a : c), (b, a !== a), a !== (b ? a : c) ); } f(0, 0, 0), f(0, true, 0), f(1, 2, 3), f(1, null, 3), f(NaN), f(NaN, "foo");
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/hoist_decl/input.js
JavaScript
if (x()) { var a; y(); } else { z(); var b; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/hoist_decl/output.js
JavaScript
var a, b; x() ? y() : z();
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/hoist_decl/output.mangleOnly.js
JavaScript
if (x()) { var a; y(); } else { z(); var e; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/hoist_decl/output.terser.js
JavaScript
var a, b; x() ? y() : z();
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/ifs_1/input.js
JavaScript
if (foo) bar(); if (!foo); else bar(); if (foo); else bar(); if (foo); else;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/ifs_1/output.js
JavaScript
foo && bar(); foo && bar(); foo || bar(); foo;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/ifs_1/output.mangleOnly.js
JavaScript
if (foo) bar(); if (!foo) ; else bar(); if (foo) ; else bar(); if (foo) ; else ;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/ifs_1/output.terser.js
JavaScript
foo && bar(); foo && bar(); foo || bar(); foo;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/ifs_2/input.js
JavaScript
if (foo) { x(); } else if (bar) { y(); } else if (baz) { z(); } if (foo) { x(); } else if (bar) { y(); } else if (baz) { z(); } else { t(); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/ifs_2/output.js
JavaScript
foo ? x() : bar ? y() : baz && z(); foo ? x() : bar ? y() : baz ? z() : t();
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/ifs_2/output.mangleOnly.js
JavaScript
if (foo) { x(); } else if (bar) { y(); } else if (baz) { z(); } if (foo) { x(); } else if (bar) { y(); } else if (baz) { z(); } else { t(); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/ifs_2/output.terser.js
JavaScript
foo ? x() : bar ? y() : baz && z(); foo ? x() : bar ? y() : baz ? z() : t();
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/ifs_3_should_warn/input.js
JavaScript
var x, y; if (x && !(x + "1") && y) { var qq; foo(); } else { bar(); } if (x || !!(x + "1") || y) { foo(); } else { var jj; bar(); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/ifs_3_should_warn/output.js
JavaScript
var x, y; var qq; bar(); var jj; foo();
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/ifs_3_should_warn/output.mangleOnly.js
JavaScript
var a, r; if (a && !(a + "1") && r) { var e; foo(); } else { bar(); } if (a || !!(a + "1") || r) { foo(); } else { var f; bar(); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/ifs_3_should_warn/output.terser.js
JavaScript
var x, y; var qq; bar(); foo(); var jj;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/ifs_4/input.js
JavaScript
if (foo && bar) { x(foo)[10].bar.baz = something(); } else x(foo)[10].bar.baz = something_else();
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/ifs_4/output.js
JavaScript
foo && bar ? (x(foo)[10].bar.baz = something()) : (x(foo)[10].bar.baz = something_else());
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/ifs_4/output.mangleOnly.js
JavaScript
if (foo && bar) { x(foo)[10].bar.baz = something(); } else x(foo)[10].bar.baz = something_else();
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/ifs_4/output.terser.js
JavaScript
foo && bar ? (x(foo)[10].bar.baz = something()) : (x(foo)[10].bar.baz = something_else());
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/ifs_5/input.js
JavaScript
function f() { if (foo) return; bar(); baz(); } function g() { if (foo) return; if (bar) return; if (baz) return; if (baa) return; a(); b(); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/ifs_5/output.js
JavaScript
function f() { if (!foo) { bar(); baz(); } } function g() { if (!(foo || bar || baz || baa)) { a(); b(); } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/ifs_5/output.mangleOnly.js
JavaScript
function r() { if (foo) return; bar(); baz(); } function f() { if (foo) return; if (bar) return; if (baz) return; if (baa) return; a(); b(); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/ifs_5/output.terser.js
JavaScript
function f() { if (!foo) { bar(); baz(); } } function g() { if (!(foo || bar || baz || baa)) { a(); b(); } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/ifs_6/input.js
JavaScript
var x, y; if (!foo && !bar && !baz && !boo) { x = 10; } else { x = 20; } if (y) { x[foo] = 10; } else { x[foo] = 20; } if (foo) { x[bar] = 10; } else { x[bar] = 20; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/ifs_6/output.js
JavaScript
var x, y; x = foo || bar || baz || boo ? 20 : 10; x[foo] = y ? 10 : 20; foo ? (x[bar] = 10) : (x[bar] = 20);
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/ifs_6/output.mangleOnly.js
JavaScript
var o, f; if (!foo && !bar && !baz && !boo) { o = 10; } else { o = 20; } if (f) { o[foo] = 10; } else { o[foo] = 20; } if (foo) { o[bar] = 10; } else { o[bar] = 20; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/ifs_6/output.terser.js
JavaScript
var x, y; x = foo || bar || baz || boo ? 20 : 10; x[foo] = y ? 10 : 20; foo ? (x[bar] = 10) : (x[bar] = 20);
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/ifs_same_consequent/input.js
JavaScript
if (foo) { x(); } else if (bar) { x(); } else if (baz) { x(); } if (foo) { x(); } else if (bar) { x(); } else if (baz) { x(); } else { x(); } if (foo) { x(); } else if (bar) { x(); } else if (baz) { x(); } else { y(); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/ifs_same_consequent/output.js
JavaScript
(foo || bar || baz) && x(); foo || bar || baz, x(); foo || bar || baz ? x() : y();
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/ifs_same_consequent/output.mangleOnly.js
JavaScript
if (foo) { x(); } else if (bar) { x(); } else if (baz) { x(); } if (foo) { x(); } else if (bar) { x(); } else if (baz) { x(); } else { x(); } if (foo) { x(); } else if (bar) { x(); } else if (baz) { x(); } else { y(); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/ifs_same_consequent/output.terser.js
JavaScript
(foo || bar || baz) && x(); foo || bar || baz, x(); foo || bar || baz ? x() : y();
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/issue_1154/input.js
JavaScript
function f1(x) { return x ? -1 : -1; } function f2(x) { return x ? +2 : +2; } function f3(x) { return x ? ~3 : ~3; } function f4(x) { return x ? !4 : !4; } function f5(x) { return x ? void 5 : void 5; } function f6(x) { return x ? typeof 6 : typeof 6; } function g1() { return g() ? -1 : -1; } function g2() { return g() ? +2 : +2; } function g3() { return g() ? ~3 : ~3; } function g4() { return g() ? !4 : !4; } function g5() { return g() ? void 5 : void 5; } function g6() { return g() ? typeof 6 : typeof 6; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/issue_1154/output.js
JavaScript
function f1(x) { return -1; } function f2(x) { return 2; } function f3(x) { return -4; } function f4(x) { return !1; } function f5(x) { return; } function f6(x) { return "number"; } function g1() { return g(), -1; } function g2() { return g(), 2; } function g3() { return g(), -4; } function g4() { return g(), !1; } function g5() { return void g(); } function g6() { return g(), "number"; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/issue_1154/output.mangleOnly.js
JavaScript
function n(n) { return n ? -1 : -1; } function t(n) { return n ? +2 : +2; } function r(n) { return n ? ~3 : ~3; } function u(n) { return n ? !4 : !4; } function o(n) { return n ? void 5 : void 5; } function e(n) { return n ? typeof 6 : typeof 6; } function f() { return g() ? -1 : -1; } function i() { return g() ? +2 : +2; } function c() { return g() ? ~3 : ~3; } function d() { return g() ? !4 : !4; } function p() { return g() ? void 5 : void 5; } function v() { return g() ? typeof 6 : typeof 6; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/issue_1154/output.terser.js
JavaScript
function f1(x) { return -1; } function f2(x) { return 2; } function f3(x) { return -4; } function f4(x) { return !1; } function f5(x) { return; } function f6(x) { return "number"; } function g1() { return g(), -1; } function g2() { return g(), 2; } function g3() { return g(), -4; } function g4() { return g(), !1; } function g5() { return void g(); } function g6() { return g(), "number"; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/issue_1645_1/input.js
JavaScript
var a = 100, b = 10; (b = a) ? (a++ + (b += a) ? (b += a) : (b += a)) : (b ^= a); console.log(a, b);
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/issue_1645_1/output.js
JavaScript
var a = 100, b = 10; (b = a) ? (a++, b += a, b += a) : b ^= a; console.log(a, b);
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/issue_1645_1/output.mangleOnly.js
JavaScript
var o = 100, l = 10; (l = o) ? (o++ + (l += o) ? (l += o) : (l += o)) : (l ^= o); console.log(o, l);
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/issue_1645_1/output.terser.js
JavaScript
var a = 100, b = 10; (b = a) ? (a++ + (b += a), (b += a)) : (b ^= a); console.log(a, b);
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/issue_1645_2/input.js
JavaScript
var a = 0; function f() { return a++; } f() ? (a += 2) : (a += 4); console.log(a);
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_minifier/tests/terser/compress/conditionals/issue_1645_2/output.js
JavaScript
var a = 0; function f() { return a++; } f() ? (a += 2) : (a += 4); console.log(a);
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University