swc/ecmascript/minifier/tests/terser/compress/arrays/constant_join/input.js
강동윤 c6b22c57f8
feat(es/minifier): Implement minifier partially (#1302)
Co-authored-by: Fábio Santos <fabiosantosart@gmail.com>
2021-05-20 13:51:30 +09:00

20 lines
882 B
JavaScript

var a = ["foo", "bar", "baz"].join("");
var a1 = ["foo", "bar", "baz"].join();
var a2 = ["foo", "bar", "baz"].join(null);
var a3 = ["foo", "bar", "baz"].join(void 0);
var a4 = ["foo", , "baz"].join();
var a5 = ["foo", null, "baz"].join();
var a6 = ["foo", void 0, "baz"].join();
var b = ["foo", 1, 2, 3, "bar"].join("");
var c = [boo(), "foo", 1, 2, 3, "bar", bar()].join("");
var c1 = [boo(), bar(), "foo", 1, 2, 3, "bar", bar()].join("");
var c2 = [1, 2, "foo", "bar", baz()].join("");
var c3 = [boo() + bar() + "foo", 1, 2, 3, "bar", bar() + "foo"].join("");
var c4 = [1, 2, null, undefined, "foo", "bar", baz()].join("");
var c5 = [boo() + bar() + "foo", 1, 2, 3, "bar", bar() + "foo"].join();
var c6 = [1, 2, null, undefined, "foo", "bar", baz()].join();
var d = ["foo", 1 + 2 + "bar", "baz"].join("-");
var e = [].join(foo + bar);
var f = [].join("");
var g = [].join("foo");