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_transforms_compat/tests/for-of/spec-identifier/output.js | JavaScript | var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
try {
for(var _iterator = arr[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
i = _step.value;
}
} catch (err) {
_didIteratorErro... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/for-of/spec-ignore-cases/input.js | JavaScript | for (var i of foo) {
switch (i) {
case 1:
break;
}
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/for-of/spec-ignore-cases/output.js | JavaScript | var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
try {
for(var _iterator = foo[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
var i = _step.value;
switch(i){
case 1:... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/new-target/edge-12/input.js | JavaScript | function foo() {
const a = () => new.target
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/new-target/edge-12/output.js | JavaScript | function foo() {
const a = ()=>this instanceof foo ? this.constructor : void 0;
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/new-target/edge-13/input.js | JavaScript | class A {
foo() {
return () => new.target
}
constructor() {
() => new.target
}
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/new-target/edge-13/output.js | JavaScript | class A {
foo() {
return ()=>void 0;
}
constructor(){
()=>this.constructor;
}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/new-target/exec/block/exec.js | JavaScript | const targets = [];
{
function foo() {
targets.push(new.target);
}
foo();
}
expect(targets[0]).toBeUndefined();
{
class Foo {
constructor() {
targets.push(new.target);
}
}
new Foo();
}
expect(targets[1]).not.toBeUndefined();
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/new-target/exec/class-extended/exec.js | JavaScript | "use strict";
const targets = [];
class Foo {
constructor() {
targets.push(new.target);
}
}
class Bar extends Foo {
constructor() {
super();
targets.push(new.target);
}
}
new Foo();
new Bar();
expect(targets[0]).toBe(Foo);
expect(targets[1]).toBe(Bar);
expect(targets[2]).toBe... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/new-target/exec/class/exec.js | JavaScript | "use strict";
const targets = [];
class Foo {
constructor() {
targets.push(new.target);
}
}
new Foo();
expect(targets[0]).toBe(Foo);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/new-target/exec/function-class-extended/exec.js | JavaScript | "use strict";
const targets = [];
function Foo() {
targets.push(new.target);
}
function Bar() {
Foo.call(this);
}
new Foo();
new Bar();
expect(targets[0]).toBe(Foo);
expect(targets[1]).toBeUndefined();
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/new-target/exec/function-class/exec.js | JavaScript | "use strict";
const targets = [];
function Foo() {
targets.push(new.target);
}
new Foo();
expect(targets[0]).toBe(Foo);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/new-target/exec/function/exec.js | JavaScript | "use strict";
const targets = [];
function foo() {
targets.push(new.target);
}
foo();
foo.call({});
expect(targets[0]).toBeUndefined();
expect(targets[1]).toBeUndefined();
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/new-target/exec/reflect-class/exec.js | JavaScript | const targets = [];
class Foo {
constructor() {
targets.push(new.target);
}
}
class Bar extends Foo {}
class Baz {}
Reflect.construct(Foo, []);
Reflect.construct(Foo, [], Bar);
Reflect.construct(Bar, []);
Reflect.construct(Bar, [], Baz);
Reflect.construct(Foo, [], Baz);
expect(targets[0]).toBe(Foo);
... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/new-target/exec/reflect-function/exec.js | JavaScript | const targets = [];
function Foo() {
targets.push(new.target);
}
function Bar() {
Foo.call(this);
}
Bar.prototype = Object.create(Foo.prototype, {
constructor: {
value: Bar,
writable: true,
configurable: true,
},
});
function Baz() {}
Reflect.construct(Foo, []);
Reflect.constr... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/new-target/general/arrow/input.js | JavaScript | function Foo() {
const a = () => {
new.target;
};
}
class Bar {
constructor() {
const a = () => {
new.target;
};
}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/new-target/general/arrow/output.js | JavaScript | function Foo() {
var _newtarget = this instanceof Foo ? this.constructor : void 0;
const a = function() {
_newtarget;
};
}
class Bar {
constructor(){
var _newtarget = this.constructor;
const a = function() {
_newtarget;
};
}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/new-target/general/block/input.js | JavaScript | {
class Foo {
constructor() {
new.target;
}
test() {
new.target;
}
}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/new-target/general/block/output.js | JavaScript | {
class Foo {
constructor() {
this.constructor;
}
test() {
void 0;
}
}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/new-target/general/class-properties-loose/exec.js | JavaScript | class Foo {
constructor() {
this.Bar = class {
static p = new.target;
};
}
}
expect(new Foo().Bar.p).toBeUndefined();
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/new-target/general/class-properties-loose/input.js | JavaScript | class Foo {
constructor() {
this.Bar = class {
static p = new.target;
static p1 = class {
constructor() {
new.target;
}
}; // should not replace
static p2 = new (function () {
new.target;
... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/new-target/general/class-properties-loose/output.js | JavaScript | class Foo {
constructor(){
this.test = function _target() {
this instanceof _target ? this.constructor : void 0;
};
this.test2 = function() {
void 0;
};
var _class;
this.Bar = (_class = class {
constructor(){
this.q ... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/new-target/general/class-properties/exec.js | JavaScript | class Foo {
constructor() {
this.Bar = class {
static p = new.target;
};
}
}
expect(new Foo().Bar.p).toBeUndefined();
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/new-target/general/class-properties/input.js | JavaScript | class Foo {
constructor() {
this.Bar = class {
static p = new.target;
static p1 = class {
constructor() {
new.target;
}
}; // should not replace
static p2 = new (function () {
new.target;
... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/new-target/general/class-properties/output.js | JavaScript | class Foo {
constructor(){
_define_property(this, "test", function _target() {
this instanceof _target ? this.constructor : void 0;
});
_define_property(this, "test2", function() {
void 0;
});
var _class;
this.Bar = (_class = class {
... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/new-target/general/class/input.js | JavaScript | class Foo {
constructor() {
new.target;
}
test() {
new.target;
}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/new-target/general/class/output.js | JavaScript | class Foo {
constructor(){
this.constructor;
}
test() {
void 0;
}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/new-target/general/extended-class/input.js | JavaScript | class Foo {
constructor() {
new.target;
}
}
class Bar extends Foo {
constructor() {
// This is probably bad...
new.target;
super();
}
}
class Baz extends Foo {
constructor() {
super();
new.target;
}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/new-target/general/extended-class/output.js | JavaScript | class Foo {
constructor(){
this.constructor;
}
}
class Bar extends Foo {
constructor(){
// This is probably bad...
this.constructor;
super();
}
}
class Baz extends Foo {
constructor(){
super();
this.constructor;
}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/new-target/general/function/input.js | JavaScript | function Foo() {
new.target;
}
Foo.prototype.test = function () {
new.target;
};
var Bar = function () {
new.target;
};
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/new-target/general/function/output.js | JavaScript | function Foo() {
this instanceof Foo ? this.constructor : void 0;
}
Foo.prototype.test = function _target() {
this instanceof _target ? this.constructor : void 0;
};
var Bar = function _target() {
this instanceof _target ? this.constructor : void 0;
};
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/new-target/general/iiaf-class/input.js | JavaScript | (() => {
class Foo {
constructor() {
new.target;
}
test() {
new.target;
}
}
})();
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/new-target/general/iiaf-class/output.js | JavaScript | (() => {
class Foo {
constructor() {
this.constructor;
}
test() {
void 0;
}
}
})()
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/new-target/general/object/input.js | JavaScript | "use strict";
const object = {
test() {
new.target;
},
test2: function () {
new.target;
},
};
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/new-target/general/object/output.js | JavaScript | "use strict";
const object = {
test () {
void 0;
},
test2: function _target() {
this instanceof _target ? this.constructor : void 0;
}
};
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/new-target/issue-4193/input.js | JavaScript | const v0 = Symbol("Context#bar");
module.exports = {
get bar() {
if (new.target === "foo") {
return;
}
return new Proxy(this, v0);
}
}; | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/new-target/issue-4193/output.js | JavaScript | const v0 = Symbol("Context#bar");
module.exports = {
get bar () {
if (void 0 === "foo") {
return;
}
return new Proxy(this, v0);
}
};
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/object-rest-spread/7776/input.js | JavaScript | function fn([
{ foo, ...flags },
{ bar }
]) {
console.log(flags.rangeChanged);
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/object-rest-spread/7776/output.js | JavaScript | function fn(_param) {
var [{ foo }, { bar }] = _param, flags = _object_without_properties(_param[0], [
"foo"
]);
console.log(flags.rangeChanged);
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/object-rest-spread/rest-parameters/1/input.js | JavaScript | function a({ ...a34 }) { } | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/object-rest-spread/rest-parameters/1/output.js | JavaScript | function a(_param) {
var a34 = _extends({}, _object_destructuring_empty(_param));
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/object-rest-spread/rest-parameters/10/input.js | JavaScript | function a10([a1, { ...a2 }]) { }
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/object-rest-spread/rest-parameters/10/output.js | JavaScript | function a10(_param) {
var [a1, {}] = _param, a2 = _extends({}, _object_destructuring_empty(_param[1]));
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/object-rest-spread/rest-parameters/11/input.js | JavaScript | function b(a) { }
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/object-rest-spread/rest-parameters/11/output.js | JavaScript | function b(a) {}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/object-rest-spread/rest-parameters/12/input.js | JavaScript | function b2(a, ...b) { }
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/object-rest-spread/rest-parameters/12/output.js | JavaScript | function b2(a, ...b) {}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/object-rest-spread/rest-parameters/13/input.js | JavaScript | function b3({ b }) { }
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/object-rest-spread/rest-parameters/13/output.js | JavaScript | function b3({ b }) {}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/object-rest-spread/rest-parameters/2/input.js | JavaScript | function a2({ a1, ...b1 }) { }
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/object-rest-spread/rest-parameters/2/output.js | JavaScript | function a2(_param) {
var { a1 } = _param, b1 = _object_without_properties(_param, [
"a1"
]);
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/object-rest-spread/rest-parameters/3/input.js | JavaScript | function a3({ a2, b2, ...c2 }) { }
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/object-rest-spread/rest-parameters/3/output.js | JavaScript | function a3(_param) {
var { a2, b2 } = _param, c2 = _object_without_properties(_param, [
"a2",
"b2"
]);
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/object-rest-spread/rest-parameters/4/input.js | JavaScript | function a4({ a3, ...c3 }, { a5, ...c5 }) { }
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/object-rest-spread/rest-parameters/4/output.js | JavaScript | function a4(_param, _param1) {
var { a3 } = _param, c3 = _object_without_properties(_param, [
"a3"
]), { a5 } = _param1, c5 = _object_without_properties(_param1, [
"a5"
]);
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/object-rest-spread/rest-parameters/5/input.js | JavaScript | function a5({ a3, b2: { ba1, ...ba2 }, ...c3 }) { }
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/object-rest-spread/rest-parameters/5/output.js | JavaScript | function a5(_param) {
var { a3, b2: { ba1 } } = _param, ba2 = _object_without_properties(_param.b2, [
"ba1"
]), c3 = _object_without_properties(_param, [
"a3",
"b2"
]);
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/object-rest-spread/rest-parameters/6/input.js | JavaScript | function a6({ a3, b2: { ba1, ...ba2 } }) { }
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/object-rest-spread/rest-parameters/6/output.js | JavaScript | function a6(_param) {
var { a3, b2: { ba1 } } = _param, ba2 = _object_without_properties(_param.b2, [
"ba1"
]);
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/object-rest-spread/rest-parameters/7/input.js | JavaScript | function a7({ a1 = 1, ...b1 } = {}) { }
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/object-rest-spread/rest-parameters/7/output.js | JavaScript | function a7(_param = {}) {
var { a1 = 1 } = _param, b1 = _object_without_properties(_param, [
"a1"
]);
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/object-rest-spread/rest-parameters/8/input.js | JavaScript | function a8([{ ...a1 }]) { }
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/object-rest-spread/rest-parameters/8/output.js | JavaScript | function a8(_param) {
var a1 = _extends({}, _object_destructuring_empty(_param[0]));
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/object-rest-spread/rest-parameters/9/input.js | JavaScript | function a9([{ a1, ...a2 }]) { }
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/object-rest-spread/rest-parameters/9/output.js | JavaScript | function a9(_param) {
var [{ a1 }] = _param, a2 = _object_without_properties(_param[0], [
"a1"
]);
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/optional-chaining-loose/general-function-call-loose/input.js | JavaScript | foo?.(foo);
foo?.bar();
foo.bar?.(foo.bar, false);
foo?.bar?.(foo.bar, true);
foo.bar.baz?.();
foo.bar?.baz();
foo.bar?.baz?.();
foo?.bar.baz();
foo?.bar.baz?.();
foo?.bar?.baz();
foo?.bar?.baz?.();
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/optional-chaining-loose/general-function-call-loose/output.js | JavaScript | var _foo_bar, _foo_bar1, _foo_bar_baz, _foo_bar2, _foo_bar_baz1, _foo_bar3, _foo_bar_baz2, _foo_bar4;
foo == null ? void 0 : foo(foo);
foo == null ? void 0 : foo.bar();
foo.bar == null ? void 0 : foo.bar.call(foo, foo.bar, false);
foo == null ? void 0 : (_foo_bar = foo.bar) == null ? void 0 : _foo_bar.call(foo, foo.bar... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/optional-chaining-loose/general-function-param-loose/input.js | JavaScript | function f(a = x?.y) {}
function g({ a, b = a?.c }) {}
function h(a, { b = a.b?.c?.d.e }) {}
function i(a, { b = (a.b?.c?.d).e }) {}
function j(a, { b = a?.b?.c().d.e }) {}
const k = function (a, b = a?.b) {};
const l = (a, b = a?.b) => {};
const m = {
m(a, b = a?.b) {},
};
const n = class {
n(a, b = a?... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/optional-chaining-loose/general-function-param-loose/output.js | JavaScript | var _a_b_c, _a_b, _a_b_c1, _a_b1, _a_b2;
function f(a1 = x == null ? void 0 : x.y) {}
function g({ a: a1, b: b1 = a1 == null ? void 0 : a1.c }) {}
function h(a1, { b: b1 = (_a_b = a1.b) == null ? void 0 : (_a_b_c = _a_b.c) == null ? void 0 : _a_b_c.d.e }) {}
function i(a1, { b: b1 = ((_a_b1 = a1.b) == null ? void 0 : (... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/optional-chaining-loose/general-member-expression-loose/input.js | JavaScript | foo?.[foo];
foo?.bar[0];
foo.bar?.[foo?.bar];
foo?.bar?.[foo?.bar];
foo.bar.baz?.d;
foo.bar?.baz.d;
foo.bar?.baz?.d;
foo?.bar.baz.d;
foo?.bar.baz?.d;
foo?.bar?.baz.d;
foo?.bar?.baz?.d;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/optional-chaining-loose/general-member-expression-loose/output.js | JavaScript | var _foo_bar, _foo_bar1, _foo_bar_baz, _foo_bar2, _foo_bar_baz1, _foo_bar3, _foo_bar_baz2, _foo_bar4, _foo_bar_baz3, _foo_bar5;
foo == null ? void 0 : foo[foo];
foo == null ? void 0 : foo.bar[0];
(_foo_bar = foo.bar) == null ? void 0 : _foo_bar[foo == null ? void 0 : foo.bar];
foo == null ? void 0 : (_foo_bar1 = foo.ba... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/optional-chaining-loose/general-memoize-loose/input.js | JavaScript | "use strict";
function test(foo) {
foo?.bar;
foo?.bar?.baz;
foo?.(foo);
foo?.bar()
foo.get(bar)?.()
foo.bar()?.()
foo[bar]()?.()
foo.bar().baz?.()
foo[bar]().baz?.()
foo.bar?.(foo.bar, false)
foo?.bar?.(foo.bar, true)
foo.bar?.baz(foo.bar, false)
foo?.bar?.... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/optional-chaining-loose/general-memoize-loose/output.js | JavaScript | "use strict";
function test(foo) {
var _foo_bar, _foo_get, _foo_bar1, _foo_bar2, _foo_bar_baz, _foo_bar3, _foo_bar_baz1, _foo_bar4, _foo_bar5, _foo_bar6, _foo_bar7, _foo_bar_baz2, _foo_bar8, _foo_bar_baz3, _foo_bar9;
foo == null ? void 0 : foo.bar;
foo == null ? void 0 : (_foo_bar = foo.bar) == null ? void ... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/optional-chaining-loose/general-method-key-loose/input.js | JavaScript | let x;
const a = {
[x.y?.z]() { }
}; | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/optional-chaining-loose/general-method-key-loose/output.js | JavaScript | var _x_y;
let x;
const a = {
[(_x_y = x.y) == null ? void 0 : _x_y.z] () {}
};
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/optional-chaining-loose/general-super-method-call-loose/input.js | JavaScript | "use strict";
class Base {
method() {
return 'Hello!';
}
}
class Derived extends Base {
method() {
return super.method?.()
}
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/optional-chaining-loose/general-super-method-call-loose/output.js | JavaScript | "use strict";
class Base {
method() {
return 'Hello!';
}
}
class Derived extends Base {
method() {
return super.method == null ? void 0 : super.method.call(this);
}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/optional-chaining-loose/issue-7559/input.js | JavaScript | class Foo {
#x;
test() {
this?.y.#x;
}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/optional-chaining-loose/issue-7559/output.js | JavaScript | var _x = /*#__PURE__*/ new WeakMap();
class Foo {
test() {
var _this, _this_y;
(_this = this) == null ? void 0 : _class_private_field_get(_this_y = _this.y, _x);
}
constructor(){
_class_private_field_init(this, _x, {
writable: true,
value: void 0
});
... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/optional-chaining/call-1/input.js | JavaScript | obj?.a?.b() | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/optional-chaining/call-1/output.js | JavaScript | var _obj_a, _obj;
(_obj = obj) === null || _obj === void 0 ? void 0 : (_obj_a = _obj.a) === null || _obj_a === void 0 ? void 0 : _obj_a.b();
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/optional-chaining/call-2/input.js | JavaScript | a?.b?.c?.() | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/optional-chaining/call-2/output.js | JavaScript | var _a_b_c, _a_b, _a;
(_a = a) === null || _a === void 0 ? void 0 : (_a_b = _a.b) === null || _a_b === void 0 ? void 0 : (_a_b_c = _a_b.c) === null || _a_b_c === void 0 ? void 0 : _a_b_c.call(_a_b);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/optional-chaining/curried-function-call/input.js | JavaScript | a?.b()();
a?.b()()();
a?.b()().c;
a?.b()()?.c;
a?.b()()?.c()(); | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/optional-chaining/curried-function-call/output.js | JavaScript | var _a, _a1, _a2, _a_b, _a3, _a_b1, _a4;
(_a = a) === null || _a === void 0 ? void 0 : _a.b()();
(_a1 = a) === null || _a1 === void 0 ? void 0 : _a1.b()()();
(_a2 = a) === null || _a2 === void 0 ? void 0 : _a2.b()().c;
(_a3 = a) === null || _a3 === void 0 ? void 0 : (_a_b = _a3.b()()) === null || _a_b === void 0 ? void... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/optional-chaining/general-assignment/input.js | JavaScript | "use strict";
const obj = {
a: {
b: {
c: {
d: 2,
},
},
},
};
const a = obj?.a;
const b = obj?.a?.b;
const bad = obj?.b?.b;
let val;
val = obj?.a?.b;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/optional-chaining/general-assignment/output.js | JavaScript | "use strict";
var _obj_a, _obj_b, _obj_a1;
const obj = {
a: {
b: {
c: {
d: 2
}
}
}
};
const a = obj === null || obj === void 0 ? void 0 : obj.a;
const b = obj === null || obj === void 0 ? void 0 : (_obj_a = obj.a) === null || _obj_a === void 0 ? void 0 : _... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/optional-chaining/general-containers/input.js | JavaScript | var street = user.address?.street
street = user.address?.street
test(a?.b, 1);
(a?.b, 2); | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/optional-chaining/general-containers/output.js | JavaScript | var _user_address, _user_address1, _a, _a1;
var street = (_user_address = user.address) === null || _user_address === void 0 ? void 0 : _user_address.street;
street = (_user_address1 = user.address) === null || _user_address1 === void 0 ? void 0 : _user_address1.street;
test((_a = a) === null || _a === void 0 ? void 0 ... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/optional-chaining/general-delete/exec.js | JavaScript | "use strict";
const obj = {
a: {
b: 0,
},
};
console.log(delete obj?.a?.b);
console.log(delete obj?.a);
console.log(delete obj?.c?.b);
// Ensure we delete in sloppy function, so delete returns false instead of
// throwing an error.
new Function(
`(${() => {
const obj = {
a: Ob... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/optional-chaining/general-delete/input.js | JavaScript | "use strict";
const obj = {
a: {
b: 0,
},
};
let test = delete obj?.a?.b;
test = delete obj?.a.b;
test = delete obj?.b?.b;
delete obj?.a; | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/optional-chaining/general-delete/output.js | JavaScript | "use strict";
var _obj_a, _obj_b;
const obj = {
a: {
b: 0
}
};
let test = obj === null || obj === void 0 ? true : (_obj_a = obj.a) === null || _obj_a === void 0 ? true : delete _obj_a.b;
test = obj === null || obj === void 0 ? true : delete obj.a.b;
test = obj === null || obj === void 0 ? true : (_obj_b... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/optional-chaining/general-function-call/input.js | JavaScript | foo?.(foo);
foo?.bar()
foo.bar?.(foo.bar, false)
foo?.bar?.(foo.bar, true)
foo?.().bar
foo?.()?.bar
foo.bar?.().baz
foo.bar?.()?.baz
foo?.bar?.().baz
foo?.bar?.()?.baz
foo?.bar()?.() | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/optional-chaining/general-function-call/output.js | JavaScript | var _foo, _foo1, _foo_bar, _foo2, _foo_bar1, _foo3, _foo4, _foo5, _foo6, _foo_bar2, _foo7, _foo_bar3, _foo_bar4, _foo8, _foo_bar5, _foo9, _foo_bar6, _foo_bar7, _foo10, _foo_bar8, _foo11;
(_foo = foo) === null || _foo === void 0 ? void 0 : _foo(foo);
(_foo1 = foo) === null || _foo1 === void 0 ? void 0 : _foo1.bar();
(_f... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/optional-chaining/general-member-access/input.js | JavaScript | foo?.bar;
a?.b.c?.d.e;
a.b?.c.d?.e;
a.b.c?.d?.e;
orders?.[0].price;
orders?.[0]?.price;
orders[client?.key].price;
orders[client.key]?.price;
(0, a?.b).c;
(0, (0, a?.b).c?.d).e; | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/optional-chaining/general-member-access/output.js | JavaScript | var _foo, _a_b_c, _a, _a_b_c_d, _a_b, _a_b_c_d1, _a_b_c1, _orders, _orders_, _orders1, _client, _orders_client_key, _a1, _c, _a2;
(_foo = foo) === null || _foo === void 0 ? void 0 : _foo.bar;
(_a = a) === null || _a === void 0 ? void 0 : (_a_b_c = _a.b.c) === null || _a_b_c === void 0 ? void 0 : _a_b_c.d.e;
(_a_b = a.b... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/optional-chaining/general-memoize/input.js | JavaScript | function test(foo) {
foo?.bar;
foo?.bar?.baz;
foo?.(foo);
foo?.bar()
foo.bar?.(foo.bar, false)
foo?.bar?.(foo.bar, true)
foo.bar?.baz(foo.bar, false)
foo?.bar?.baz(foo.bar, true)
foo.bar?.baz?.(foo.bar, false)
foo?.bar?.baz?.(foo.bar, true)
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/optional-chaining/general-memoize/output.js | JavaScript | function test(foo) {
var _foo_bar, _foo_bar1, _foo_bar2, _foo_bar3, _foo_bar4, _foo_bar_baz, _foo_bar5, _foo_bar_baz1, _foo_bar6;
foo === null || foo === void 0 ? void 0 : foo.bar;
foo === null || foo === void 0 ? void 0 : (_foo_bar = foo.bar) === null || _foo_bar === void 0 ? void 0 : _foo_bar.baz;
foo... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/optional-chaining/general-super-method-call/input.js | JavaScript | "use strict";
class Base {
method() {
return 'Hello!';
}
}
class Derived extends Base {
method() {
return super.method?.()
}
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_compat/tests/optional-chaining/general-super-method-call/output.js | JavaScript | "use strict";
class Base {
method() {
return 'Hello!';
}
}
class Derived extends Base {
method() {
var _super_method;
return (_super_method = super.method) === null || _super_method === void 0 ? void 0 : _super_method.call(this);
}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.