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/__swc_snapshots__/tests/es2015_spread.rs/spread_contexted_method_call_multiple_args.js
JavaScript
var _foob, _foob_test; (_foob = foob).add.apply(_foob, [ foo, bar ].concat(_to_consumable_array(numbers))); (_foob_test = foob.test).add.apply(_foob_test, [ foo, bar ].concat(_to_consumable_array(numbers)));
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_spread.rs/spread_contexted_method_call_single_arg.js
JavaScript
var _foob, _foob_test; (_foob = foob).add.apply(_foob, _to_consumable_array(numbers)); (_foob_test = foob.test).add.apply(_foob_test, _to_consumable_array(numbers));
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_spread.rs/spread_contexted_method_call_super_multiple_args.js
JavaScript
class Foo { bar() { super.bar.apply(this, [ arg1, arg2 ].concat(_to_consumable_array(args))); } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_spread.rs/spread_contexted_method_call_super_single_arg.js
JavaScript
class Foo { bar() { super.bar.apply(this, _to_consumable_array(args)); } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_spread.rs/spread_literial.js
JavaScript
f.apply(void 0, [ 1 ].concat(_to_consumable_array([ 2, 3 ]), _to_consumable_array(_to_consumable_array([ 4, 5 ])), _to_consumable_array([ 6 ].concat(_to_consumable_array([ 7 ]))))); f.apply(void 0, [ 1 ].concat(Array.from("123"), _to_consumable_array(Array.from("456").concat(Array.from("789")))));
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_spread.rs/spread_literial_init_hole.js
JavaScript
f.apply(void 0, [ 1 ].concat(_to_consumable_array([ 2, , 3 ]), _to_consumable_array(_to_consumable_array([ 4, , ])))); f.apply(void 0, _to_consumable_array([ 2, , 3 ]).concat(_to_consumable_array(_to_consumable_array([ 4, , ]))));
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_spread.rs/spread_method_call_array_literal.js
JavaScript
f.apply(void 0, [ 1, 2, 3 ]);
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_spread.rs/spread_method_call_first.js
JavaScript
add.apply(void 0, _to_consumable_array(numbers).concat([ foo, bar ]));
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_spread.rs/spread_method_call_middle.js
JavaScript
add.apply(void 0, [ foo ].concat(_to_consumable_array(numbers), [ bar ]));
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_spread.rs/spread_method_call_multiple.js
JavaScript
add.apply(void 0, [ foo ].concat(_to_consumable_array(numbers), [ bar, what ], _to_consumable_array(test)));
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_spread.rs/spread_method_call_single_arg.js
JavaScript
add.apply(void 0, _to_consumable_array(numbers));
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_spread.rs/spread_new_expression.js
JavaScript
_construct(Numbers, _to_consumable_array(nums)); _construct(Numbers, [ 1 ].concat(_to_consumable_array(nums)));
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_spread.rs/spread_string_literial.js
JavaScript
var _String; (_String = String).raw.apply(_String, [ { raw: 'abcd' } ].concat(Array.from('___')));
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_spread.rs/spread_string_literial_2.js
JavaScript
f.apply(void 0, [ { x: 0 } ].concat(_to_consumable_array([ 1, 2 ]), [ [ 3 ] ], Array.from('456')));
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_spread.rs/this_context.js
JavaScript
var obj = { foo: function foo() { this.bar.apply(this, arguments); this.blah.apply(this, arguments); } };
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_template_literals.rs/codegen_01.js
JavaScript
'"';
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_template_literals.rs/codegen_02.js
JavaScript
'""';
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_template_literals.rs/codegen_03.js
JavaScript
'"'.concat(foo);
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_template_literals.rs/codegen_04.js
JavaScript
'"'.concat(foo, '"');
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_template_literals.rs/codegen_05.js
JavaScript
'""'.concat(foo, '""');
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_template_literals.rs/codegen_06.js
JavaScript
"``";
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_template_literals.rs/codegen_07.js
JavaScript
"The ".concat(argumentName, ' has unexpected type of "');
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_template_literals.rs/codegen_08.js
JavaScript
'". Expected argument to be an object with the following ';
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_template_literals.rs/codegen_09.js
JavaScript
'keys: "'.concat(reducerKeys.join('" "'), '"');
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_template_literals.rs/codegen_10.js
JavaScript
"The ".concat(argumentName, ' has unexpected type of "') + matchType + '". Expected argument to be an object with the following ' + 'keys: "'.concat(reducerKeys.join('" "'), '"');
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_template_literals.rs/default_cache_revision.js
JavaScript
function _templateObject() { const data = _tagged_template_literal([ "some template" ]); _templateObject = function() { return data; }; return data; } function _templateObject1() { const data = _tagged_template_literal([ "some template" ]); _templateObject1 = function() { return data; }; return data; } var tag = (v)=>v; function foo() { return tag(_templateObject()); } function bar() { return tag(_templateObject1()); } expect(foo()).toBe(foo()); expect(foo()).toEqual([ "some template" ]); expect(bar()).toBe(bar()); expect(bar()).toEqual([ "some template" ]); expect(bar()).not.toBe(foo());
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_template_literals.rs/default_expression_first.js
JavaScript
var foo = 5; var bar = 10; var baz = 15; var example = "a"; var example2 = "".concat(1); var example3 = 1 + "".concat(foo).concat(bar).concat(baz); var example4 = 1 + "".concat(foo, "bar").concat(baz); var example5 = "";
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_template_literals.rs/default_functions.js
JavaScript
var foo = "test ".concat(_.test(foo), " ").concat(bar);
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_template_literals.rs/default_literals.js
JavaScript
var foo = "".concat(1).concat(f, "oo", true).concat(b, "ar", 0).concat(baz);
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_template_literals.rs/default_multiline.js
JavaScript
var o = "wow\nthis is\nactually multiline!";
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_template_literals.rs/default_none.js
JavaScript
var foo = "test";
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_template_literals.rs/default_only.js
JavaScript
var foo = "".concat(test);
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_template_literals.rs/default_simple_tag.js
JavaScript
function _templateObject() { const data = _tagged_template_literal([ "wow" ]); _templateObject = function() { return data; }; return data; } function _templateObject1() { const data = _tagged_template_literal([ "first", "second" ]); _templateObject1 = function() { return data; }; return data; } var foo = tag(_templateObject()); var bar = tag(_templateObject1(), 1);
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_template_literals.rs/default_single.js
JavaScript
var foo = "test ".concat(foo);
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_template_literals.rs/default_statement.js
JavaScript
var foo = "test ".concat(foo + bar);
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_template_literals.rs/default_tag.js
JavaScript
function _templateObject() { const data = _tagged_template_literal([ "wow\na", "b ", "" ], [ "wow\\na", "b ", "" ]); _templateObject = function() { return data; }; return data; } function _templateObject1() { const data = _tagged_template_literal([ "wow\nab", " ", "" ], [ "wow\\nab", " ", "" ]); _templateObject1 = function() { return data; }; return data; } function _templateObject2() { const data = _tagged_template_literal([ "wow\naB", " ", "" ], [ "wow\\naB", " ", "" ]); _templateObject2 = function() { return data; }; return data; } var foo = bar(_templateObject(), 42, _.foobar()); var bar = bar(_templateObject1(), 42, _.foobar()); var bar = bar(_templateObject2(), 42, _.baz());
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_template_literals.rs/escape_quotes.js
JavaScript
var t = "'".concat(foo, "' \"").concat(bar, '"');
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_template_literals.rs/issue_1280.js
JavaScript
function _templateObject() { const data = _tagged_template_literal([ "'Hello'" ]); _templateObject = function() { return data; }; return data; } const myVar = T(_templateObject());
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_template_literals.rs/issue_1488_1.js
JavaScript
"`";
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_template_literals.rs/issue_1549_1.js
JavaScript
const a = "\n";
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_template_literals.rs/issue_1549_2.js
JavaScript
const a = "\r\n";
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_template_literals.rs/issue_1742_1.js
JavaScript
function _templateObject() { const data = _tagged_template_literal([ "template" ]); _templateObject = function() { return data; }; return data; } function foo() { return this; } foo(_templateObject());
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_template_literals.rs/issue_598_1.js
JavaScript
function _templateObject() { const data = _tagged_template_literal([ "Hello World" ]); _templateObject = function() { return data; }; return data; } function _templateObject1() { const data = _tagged_template_literal([ "Nobody will ever see this." ]); _templateObject1 = function() { return data; }; return data; } export function foo() { console.log(i18n(_templateObject())); console.log(i18n(_templateObject1())); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_template_literals.rs/loose_escape_quotes.js
JavaScript
var t = "'" + foo + "' \"" + bar + '"';
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_template_literals.rs/loose_expression_first.js
JavaScript
var foo = 5; var bar = 10; var baz = 15; var example = "a"; var example2 = "" + 1; var example3 = 1 + ("" + foo + bar + baz); var example4 = 1 + (foo + "bar" + baz); var example5 = "";
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_template_literals.rs/loose_function.js
JavaScript
var foo = "test " + _.test(foo) + " " + bar;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_template_literals.rs/loose_literals.js
JavaScript
var foo = "" + 1 + f + "oo" + true + b + "ar" + 0 + baz;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_template_literals.rs/loose_multi_line.js
JavaScript
var o = "wow\nthis is\nactually multiline!";
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_template_literals.rs/loose_multiple.js
JavaScript
var foo = "test " + foo + " " + bar;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_template_literals.rs/loose_no_tag.js
JavaScript
"foo ".concat(bar, " baz");
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_template_literals.rs/loose_none.js
JavaScript
var foo = "test";
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_template_literals.rs/loose_only.js
JavaScript
var foo = "" + test;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_template_literals.rs/loose_single.js
JavaScript
var foo = "test " + foo;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_template_literals.rs/loose_statement.js
JavaScript
var foo = "test " + (foo + bar);
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_template_literals.rs/loose_tag.js
JavaScript
function _templateObject() { const data = _tagged_template_literal_loose([ "wow\na", "b ", "" ], [ "wow\\na", "b ", "" ]); _templateObject = function() { return data; }; return data; } function _templateObject1() { const data = _tagged_template_literal_loose([ "wow\nab", " ", "" ], [ "wow\\nab", " ", "" ]); _templateObject1 = function() { return data; }; return data; } function _templateObject2() { const data = _tagged_template_literal_loose([ "wow\naB", " ", "" ], [ "wow\\naB", " ", "" ]); _templateObject2 = function() { return data; }; return data; } var foo = bar(_templateObject(), 42, _.foobar()); var bar = bar(_templateObject1(), 42, _.foobar()); var bar = bar(_templateObject2(), 42, _.baz());
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_template_literals.rs/multiple.js
JavaScript
var foo = "test ".concat(foo, " ").concat(bar);
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_template_literals.rs/none.js
JavaScript
var foo = "test";
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_template_literals.rs/only.js
JavaScript
var foo = "".concat(test);
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_template_literals.rs/single.js
JavaScript
var foo = "test ".concat(foo);
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_template_literals.rs/statement.js
JavaScript
var foo = "test ".concat(foo + bar);
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_template_literals.rs/template_revision.js
JavaScript
function _templateObject() { const data = _tagged_template_literal([ void 0 ], [ "\\unicode and \\u{55}" ]); _templateObject = function() { return data; }; return data; } function _templateObject1() { const data = _tagged_template_literal([ void 0 ], [ "\\01" ]); _templateObject1 = function() { return data; }; return data; } function _templateObject2() { const data = _tagged_template_literal([ void 0, "right" ], [ "\\xg", "right" ]); _templateObject2 = function() { return data; }; return data; } function _templateObject3() { const data = _tagged_template_literal([ "left", void 0 ], [ "left", "\\xg" ]); _templateObject3 = function() { return data; }; return data; } function _templateObject4() { const data = _tagged_template_literal([ "left", void 0, "right" ], [ "left", "\\xg", "right" ]); _templateObject4 = function() { return data; }; return data; } function _templateObject5() { const data = _tagged_template_literal([ "left", void 0, "right" ], [ "left", "\\u000g", "right" ]); _templateObject5 = function() { return data; }; return data; } function _templateObject6() { const data = _tagged_template_literal([ "left", void 0, "right" ], [ "left", "\\u{-0}", "right" ]); _templateObject6 = function() { return data; }; return data; } function _templateObject7() { const data = _tagged_template_literal([ void 0 ], [ "\\01" ]); _templateObject7 = function() { return data; }; return data; } tag(_templateObject()); tag(_templateObject1()); tag(_templateObject2(), 0); tag(_templateObject3(), 0); tag(_templateObject4(), 0, 1); tag(_templateObject5(), 0, 1); tag(_templateObject6(), 0, 1); function a() { var undefined = 4; tag(_templateObject7()); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2017_async_to_generator.rs/async_arrow_in_method.js
JavaScript
let TestClass = { name: "John Doe", testMethodFailure () { var _this = this; return new Promise(/*#__PURE__*/ function() { var _ref = _async_to_generator(function*(resolve) { console.log(_this); setTimeout(resolve, 1000); }); return function(resolve) { return _ref.apply(this, arguments); }; }()); } };
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2017_async_to_generator.rs/async_default_arguments.js
JavaScript
function mandatory(paramName) { throw new Error(`Missing parameter: ${paramName}`); } function foo(param) { return _foo.apply(this, arguments); } function _foo() { _foo = _async_to_generator(function*(param) { let a = param.a, _param_b = param.b, b = _param_b === void 0 ? mandatory("b") : _param_b; return Promise.resolve(b); }); return _foo.apply(this, arguments); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2017_async_to_generator.rs/async_iife.js
JavaScript
_async_to_generator(function*() { yield 'ok'; })(); _async_to_generator(function*() { yield 'ok'; })(); /*#__PURE__*/ (function() { var _notIIFE = _async_to_generator(function*() { yield 'ok'; }); function notIIFE() { return _notIIFE.apply(this, arguments); } return notIIFE; })(); /*#__PURE__*/ _async_to_generator(function*() { yield 'not iife'; });
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2017_async_to_generator.rs/async_to_generator_async.js
JavaScript
class Foo { foo() { return _async_to_generator(function*() { var wat = yield bar(); })(); } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2017_async_to_generator.rs/async_to_generator_async_arrow_in_method.js
JavaScript
let TestClass = { name: "John Doe", testMethodFailure () { var _this = this; return new Promise(/*#__PURE__*/ function() { var _ref = _async_to_generator(function*(resolve) { console.log(_this); setTimeout(resolve, 1000); }); return function(resolve) { return _ref.apply(this, arguments); }; }()); } };
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2017_async_to_generator.rs/async_to_generator_deeply_nested_asyncs.js
JavaScript
function s(x) { return _s.apply(this, arguments); } function _s() { _s = _async_to_generator(function*(x, ...args) { var _this = this, _arguments = arguments; let t = /*#__PURE__*/ function() { var _ref = _async_to_generator(function*(y, a) { let r = /*#__PURE__*/ function() { var _ref = _async_to_generator(function*(z, b, ...innerArgs) { yield z; console.log(_this, innerArgs, _arguments); return _this.x; }); return function r(z, b) { return _ref.apply(this, arguments); }; }(); yield r(); console.log(_this, args, _arguments); return _this.g(r); }); return function t(y, a) { return _ref.apply(this, arguments); }; }(); yield t(); return this.h(t); }); return _s.apply(this, arguments); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2017_async_to_generator.rs/async_to_generator_expression.js
JavaScript
var foo = /*#__PURE__*/ function() { var _ref = _async_to_generator(function*() { var wat = yield bar(); }); return function foo() { return _ref.apply(this, arguments); }; }(); var foo2 = /*#__PURE__*/ function() { var _ref = _async_to_generator(function*() { var wat = yield bar(); }); return function foo2() { return _ref.apply(this, arguments); }; }(), bar = /*#__PURE__*/ function() { var _ref = _async_to_generator(function*() { var wat = yield foo(); }); return function bar() { return _ref.apply(this, arguments); }; }();
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2017_async_to_generator.rs/async_to_generator_function_arity.js
JavaScript
function one(a) { return _one.apply(this, arguments); } function _one() { _one = _async_to_generator(function*(a, b = 1) {}); return _one.apply(this, arguments); } function two(a, b) { return _two.apply(this, arguments); } function _two() { _two = _async_to_generator(function*(a, b, ...c) {}); return _two.apply(this, arguments); } function three(a) { return _three.apply(this, arguments); } function _three() { _three = _async_to_generator(function*(a, b = 1, c, d = 3) {}); return _three.apply(this, arguments); } function four(a) { return _four.apply(this, arguments); } function _four() { _four = _async_to_generator(function*(a, b = 1, c, ...d) {}); return _four.apply(this, arguments); } function five(a, _) { return _five.apply(this, arguments); } function _five() { _five = _async_to_generator(function*(a, { b }) {}); return _five.apply(this, arguments); } function six(a) { return _six.apply(this, arguments); } function _six() { _six = _async_to_generator(function*(a, { b } = {}) {}); return _six.apply(this, arguments); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2017_async_to_generator.rs/async_to_generator_named_expression.js
JavaScript
var foo = /*#__PURE__*/ function() { var _bar = _async_to_generator(function*() { console.log(bar); }); function bar() { return _bar.apply(this, arguments); } return bar; }();
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2017_async_to_generator.rs/async_to_generator_object_method.js
JavaScript
let obj = { a: 123, foo (bar) { return _async_to_generator(function*() { return yield baz(bar); })(); } };
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2017_async_to_generator.rs/async_to_generator_object_method_with_arrows.js
JavaScript
class Class { method() { var _this = this; return _async_to_generator(function*() { _this; ()=>_this; ()=>{ _this; ()=>_this; function x() { this; ()=>{ this; }; var _this = this; /*#__PURE__*/ _async_to_generator(function*() { _this; }); } }; function x() { this; ()=>{ this; }; var _this = this; /*#__PURE__*/ _async_to_generator(function*() { _this; }); } })(); } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2017_async_to_generator.rs/async_to_generator_object_method_with_super_caching.js
JavaScript
class Foo extends class { } { method() { var _this = this, _superprop_get_method = ()=>super.method; return _async_to_generator(function*() { _superprop_get_method().call(_this); var arrow = ()=>_superprop_get_method().call(_this); })(); } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2017_async_to_generator.rs/async_to_generator_parameters.js
JavaScript
function foo(bar) { return _foo.apply(this, arguments); } function _foo() { _foo = _async_to_generator(function*(bar) {}); return _foo.apply(this, arguments); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2017_async_to_generator.rs/async_to_generator_statement.js
JavaScript
function foo() { return _foo.apply(this, arguments); } function _foo() { _foo = _async_to_generator(function*() { var wat = yield bar(); }); return _foo.apply(this, arguments); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2017_async_to_generator.rs/async_with_optional_params.js
JavaScript
_async_to_generator(function*(a = 10, ...rest) {})(); _async_to_generator(function*(a = 10, ...rest) {})();
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2017_async_to_generator.rs/async_with_optional_params_2.js
JavaScript
const Z = (f)=>((x)=>f((y)=>x(x)(y)))((x)=>f((y)=>x(x)(y))); const p = Z((f)=>/*#__PURE__*/ _async_to_generator(function*(n = 0) { return n <= 1 ? 1 : n * (yield f(n - 1)); }))(5);
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2017_async_to_generator.rs/async_wrap_arguments.js
JavaScript
function foo() { var _arguments = arguments; const bar = /*#__PURE__*/ function() { var _ref = _async_to_generator(function*() { return _arguments; }); return function bar() { return _ref.apply(this, arguments); }; }(); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2017_async_to_generator.rs/async_wrap_super_and_new_target.js
JavaScript
class Foo { constractur() { var _newtarget = new.target; const foo = /*#__PURE__*/ function() { var _ref = _async_to_generator(function*() { return _newtarget; }); return function foo() { return _ref.apply(this, arguments); }; }(); } hello() { var _this = this, _superprop_get_hello = ()=>super.hello; const world = /*#__PURE__*/ function() { var _ref = _async_to_generator(function*() { return _superprop_get_hello().call(_this); }); return function world() { return _ref.apply(this, arguments); }; }(); } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2017_async_to_generator.rs/async_wrap_this.js
JavaScript
var _this = this; const foo = /*#__PURE__*/ function() { var _ref = _async_to_generator(function*(x, y, ...z) { return _this; }); return function foo(x, y) { return _ref.apply(this, arguments); }; }();
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2017_async_to_generator.rs/babel_parameters.js
JavaScript
function foo(bar) { return _foo.apply(this, arguments); } function _foo() { _foo = _async_to_generator(function*(bar) {}); return _foo.apply(this, arguments); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2017_async_to_generator.rs/deeply_nested_asyncs.js
JavaScript
function s(x) { return _s.apply(this, arguments); } function _s() { _s = _async_to_generator(function*(x) { for(var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++){ args[_key - 1] = arguments[_key]; } var _this = this, _arguments = arguments; let t = /*#__PURE__*/ function() { var _t = _async_to_generator(function*(y, a) { let r = /*#__PURE__*/ function() { var _r = _async_to_generator(function*(z, b) { for(var _len = arguments.length, innerArgs = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++){ innerArgs[_key - 2] = arguments[_key]; } yield z; console.log(_this, innerArgs, _arguments); return _this.x; }); function r(z, b) { return _r.apply(this, arguments); } return r; }(); yield r(); console.log(_this, args, _arguments); return _this.g(r); }); function t(y, a) { return _t.apply(this, arguments); } return t; }(); yield t(); return this.h(t); }); return _s.apply(this, arguments); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2017_async_to_generator.rs/export_default_async_nested_1.js
JavaScript
export default function foo(x) { return _foo.apply(this, arguments); } function _foo() { _foo = _async_to_generator(function*(x) { function bar(y) { return _bar.apply(this, arguments); } function _bar() { _bar = _async_to_generator(function*(y) { y(x); }); return _bar.apply(this, arguments); } }); return _foo.apply(this, arguments); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2017_async_to_generator.rs/export_default_async_nested_2.js
JavaScript
export default function(x) { return _ref.apply(this, arguments); } function _ref() { _ref = _async_to_generator(function*(x) { function bar(y) { return _bar.apply(this, arguments); } function _bar() { _bar = _async_to_generator(function*(y) { (function() { var _ref = _async_to_generator(function*(z) { return x(y)(z); }); return function(z) { return _ref.apply(this, arguments); }; })()(); }); return _bar.apply(this, arguments); } }); return _ref.apply(this, arguments); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2017_async_to_generator.rs/expression.js
JavaScript
var foo = /*#__PURE__*/ function() { var _foo = _async_to_generator(function*() { var wat = yield bar(); }); function foo() { return _foo.apply(this, arguments); } return foo; }(); var foo2 = /*#__PURE__*/ function() { var _foo2 = _async_to_generator(function*() { var wat = yield bar(); }); function foo2() { return _foo2.apply(this, arguments); } return foo2; }(), bar = /*#__PURE__*/ function() { var _bar = _async_to_generator(function*() { var wat = yield foo(); }); function bar() { return _bar.apply(this, arguments); } return bar; }();
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2017_async_to_generator.rs/function_length_issue_3135_1.js
JavaScript
function foo(x, y) { return _foo.apply(this, arguments); } function _foo() { _foo = _async_to_generator(function*(x, y, ...z) { return 42; }); return _foo.apply(this, arguments); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2017_async_to_generator.rs/function_length_issue_3135_2.js
JavaScript
function foo(x, y) { return _foo.apply(this, arguments); } function _foo() { _foo = _wrap_async_generator(function*(x, y, ...z) { return 42; }); return _foo.apply(this, arguments); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2017_async_to_generator.rs/function_length_issue_3135_3.js
JavaScript
const foo = /*#__PURE__*/ function() { var _ref = _async_to_generator(function*(x, y, ...z) { return 42; }); return function foo(x, y) { return _ref.apply(this, arguments); }; }();
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2017_async_to_generator.rs/function_length_issue_3135_4.js
JavaScript
const foo = /*#__PURE__*/ function() { var _ref = _wrap_async_generator(function*(x, y, ...z) { return 42; }); return function foo(x, y) { return _ref.apply(this, arguments); }; }();
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2017_async_to_generator.rs/function_length_issue_3135_5.js
JavaScript
const foo = /*#__PURE__*/ function() { var _foo = _async_to_generator(function*(x, y, ...z) { if (x) { return foo(0, y); } return 0; }); function foo(x, y) { return _foo.apply(this, arguments); } return foo; }();
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2017_async_to_generator.rs/function_length_issue_3135_6.js
JavaScript
const foo = /*#__PURE__*/ function() { var _foo = _wrap_async_generator(function*(x, y, ...z) { if (x) { return foo(0, y); } return 0; }); function foo(x, y) { return _foo.apply(this, arguments); } return foo; }();
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2017_async_to_generator.rs/function_length_issue_3135_7.js
JavaScript
var _this = this; const foo = /*#__PURE__*/ function() { var _ref = _async_to_generator(function*(x, y, ...z) { return _this; }); return function foo(x, y) { return _ref.apply(this, arguments); }; }();
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2017_async_to_generator.rs/issue_1036_1.js
JavaScript
const x = /*#__PURE__*/ function() { var _ref = _async_to_generator(function*() { console.log((yield Promise.all([ [ 1 ], [ 2 ], [ 3 ] ].map(/*#__PURE__*/ function() { var _ref = _async_to_generator(function*([a]) { return Promise.resolve().then(()=>a * 2); }); return function(_) { return _ref.apply(this, arguments); }; }())))); }); return function x() { return _ref.apply(this, arguments); }; }();
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2017_async_to_generator.rs/issue_1125_1.js
JavaScript
function test() { return _test.apply(this, arguments); } function _test() { _test = _async_to_generator(function*() { try { yield 1; } finally{ console.log(2); } }); return _test.apply(this, arguments); } test();
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2017_async_to_generator.rs/issue_1216_1.js
JavaScript
const source = Math.random() < 2 ? 'matilda' : 'fred'; const details = { _id: '1' }; function request(path) { return _request.apply(this, arguments); } function _request() { _request = _async_to_generator(function*(path) { return `success:${path}`; }); return _request.apply(this, arguments); } _async_to_generator(function*() { const obj = source === 'matilda' ? details : yield request(`/${details._id}?source=${source}`); console.log({ obj }); })();
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2017_async_to_generator.rs/issue_1341_1.js
JavaScript
class A { val = '1'; foo() { var _this = this; return _async_to_generator(function*() { try { return yield (function() { var _ref = _async_to_generator(function*(x) { return x + _this.val; }); return function(x) { return _ref.apply(this, arguments); }; })()('a'); } catch (e) { throw e; } })(); } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2017_async_to_generator.rs/issue_1341_2.js
JavaScript
class A { val = '1'; foo() { var _this = this; return _async_to_generator(function*() { return yield (function() { var _ref = _async_to_generator(function*(x) { return x + _this.val; }); return function(x) { return _ref.apply(this, arguments); }; })()('a'); })(); } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2017_async_to_generator.rs/issue_1455_1.js
JavaScript
const obj = { find ({ platform }) { return { platform }; }, byPlatform: /*#__PURE__*/ function() { var _ref = _async_to_generator(function*(platform) { const result = yield this.find({ platform: { $eq: platform } }); return result; }); return function(platform) { return _ref.apply(this, arguments); }; }() }; obj.byPlatform('foo').then((v)=>console.log(v));
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2017_async_to_generator.rs/issue_1684_1.js
JavaScript
const cache = {}; function getThing(key) { return _getThing.apply(this, arguments); } function _getThing() { _getThing = _async_to_generator(function*(key) { const it = cache[key] || (yield fetchThing(key)); return it; }); return _getThing.apply(this, arguments); } function fetchThing(key) { return Promise.resolve(key.toUpperCase()).then((val)=>cache[key] = val); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2017_async_to_generator.rs/issue_1684_2.js
JavaScript
const cache = {}; function getThing(key) { return _getThing.apply(this, arguments); } function _getThing() { _getThing = _async_to_generator(function(key) { var it, _tmp; return _ts_generator(this, function(_state) { switch(_state.label){ case 0: _tmp = cache[key]; if (_tmp) return [ 3, 2 ]; return [ 4, fetchThing(key) ]; case 1: _tmp = _state.sent(); _state.label = 2; case 2: it = _tmp; return [ 2, it ]; } }); }); return _getThing.apply(this, arguments); } function fetchThing(key) { return Promise.resolve(key.toUpperCase()).then((val)=>cache[key] = val); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University