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_for_of.rs/spec_var.js
JavaScript
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; try { for(var _iterator = arr[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){ var i = _step.value; } } catch (err) { _didIteratorError = true; _iteratorError = err; } finally{ try { if (!_iteratorNormalCompletion && _iterator.return != null) { _iterator.return(); } } finally{ if (_didIteratorError) { throw _iteratorError; } } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_generator.rs/computed_properties_example.js
JavaScript
var o = { foo () { return _ts_generator(this, function(_state) { return [ 2, "foo" ]; }); } };
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_generator.rs/empty_fn_decl_1.js
JavaScript
function foo(a, b, c) { return _ts_generator(this, function(_state) { return [ 2 ]; }); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_generator.rs/hoist_function_in_async_issue_2556_4.js
JavaScript
function requester() { return pureRequester; function pureRequester() { return _pureRequester.apply(this, arguments); } function _pureRequester() { _pureRequester = _async_to_generator(function() { function refreshThenRequest() { return _refreshThenRequest.apply(this, arguments); } function _refreshThenRequest() { _refreshThenRequest = _async_to_generator(function() { return _ts_generator(this, function(_state) { return [ 2 ]; }); }); return _refreshThenRequest.apply(this, arguments); } return _ts_generator(this, function(_state) { switch(_state.label){ case 0: return [ 4, refreshThenRequest() ]; case 1: _state.sent(); return [ 2, true ]; } }); }); return _pureRequester.apply(this, arguments); } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_generator.rs/hoist_function_in_async_issue_2556_6.js
JavaScript
function foo(a) { return _foo.apply(this, arguments); } function _foo() { _foo = _async_to_generator(function(a) { function bar1(b) { return _bar1.apply(this, arguments); } function _bar1() { _bar1 = _async_to_generator(function(b) { return _ts_generator(this, function(_state) { return [ 2, a + b ]; }); }); return _bar1.apply(this, arguments); } return _ts_generator(this, function(_state) { return [ 2, bar1 ]; }); }); return _foo.apply(this, arguments); } foo(1).then((t)=>t(2)).then(console.log);
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_generator.rs/hoist_function_in_async_issue_2556_8.js
JavaScript
var fib = function fib() { return 42; }; function init() { return _init.apply(this, arguments); } function _init() { _init = _async_to_generator(function() { function fib(n) { return _fib.apply(this, arguments); } function _fib() { _fib = _async_to_generator(function(n) { var x, y; return _ts_generator(this, function(_state) { switch(_state.label){ case 0: if (n <= 1) { return [ 2, n ]; } return [ 4, fib(n - 1) ]; case 1: x = _state.sent(); return [ 4, fib(n - 2) ]; case 2: y = _state.sent(); return [ 2, x + y ]; } }); }); return _fib.apply(this, arguments); } return _ts_generator(this, function(_state) { return [ 2, fib ]; }); }); return _init.apply(this, arguments); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_generator.rs/hoist_function_in_generator_issue_2556_1.js
JavaScript
function foo() { function bar() {} return _ts_generator(this, function(_state) { return [ 2, bar ]; }); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_generator.rs/issue_1036_2.js
JavaScript
const x = function() { return _ts_generator(this, function(_state) { return [ 2, Promise.all([ [ 1 ], [ 2 ], [ 3 ] ].map(function([a]) { return _ts_generator(this, function(_state) { Promise.resolve().then(()=>a * 2); return [ 2 ]; }); })) ]; }); };
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_generator.rs/issue_1125_2.js
JavaScript
function _test() { _test = _async_to_generator(function() { return _ts_generator(this, function(_state) { switch(_state.label){ case 0: _state.trys.push([ 0, , 2, 3 ]); return [ 4, 1 ]; case 1: _state.sent(); return [ 3, 3 ]; case 2: console.log(2); return [ 7 ]; case 3: return [ 2 ]; } }); }); return _test.apply(this, arguments); } function test() { 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/es2015_generator.rs/issue_1125_3.js
JavaScript
function foo() { return _ts_generator(this, function(_state) { switch(_state.label){ case 0: _state.trys.push([ 0, , 2, 3 ]); return [ 4, 1 ]; case 1: _state.sent(); return [ 3, 3 ]; case 2: console.log(2); return [ 7 ]; case 3: return [ 2 ]; } }); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_generator.rs/issue_1125_4.js
JavaScript
function foo() { var e; return _ts_generator(this, function(_state) { switch(_state.label){ case 0: _state.trys.push([ 0, 2, , 3 ]); return [ 4, 1 ]; case 1: _state.sent(); return [ 3, 3 ]; case 2: e = _state.sent(); console.log(2); return [ 3, 3 ]; case 3: return [ 2 ]; } }); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_generator.rs/issue_1799_1.js
JavaScript
export default function Foo() { return call(/*#__PURE__*/ function() { var _ref = _async_to_generator(function(e) { return _ts_generator(this, function(_state) { switch(_state.label){ case 0: return [ 4, doSomething() ]; case 1: _state.sent(); return [ 2 ]; } }); }); return function(e) { return _ref.apply(this, arguments); }; }()); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_generator.rs/issue_1799_2.js
JavaScript
export default function Foo() { return call(/*#__PURE__*/ function() { var _ref = _async_to_generator(function(e) { return _ts_generator(this, function(_state) { switch(_state.label){ case 0: return [ 4, doSomething() ]; case 1: _state.sent(); return [ 2 ]; } }); }); return function(e) { return _ref.apply(this, arguments); }; }()); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_generator.rs/issue_1799_3.js
JavaScript
export default function Foo() { return call(/*#__PURE__*/ function() { var _ref = _async_to_generator(function(e) { return _ts_generator(this, function(_state) { switch(_state.label){ case 0: return [ 4, doSomething() ]; case 1: _state.sent(); return [ 2 ]; } }); }); return function(e) { return _ref.apply(this, arguments); }; }()); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_generator.rs/issue_1799_5.js
JavaScript
export default function Foo() { return call(/*#__PURE__*/ function() { var _ref = _async_to_generator(function(e) { return _ts_generator(this, function(_state) { switch(_state.label){ case 0: return [ 4, doSomething() ]; case 1: _state.sent(); return [ 2 ]; } }); }); return function(e) { return _ref.apply(this, arguments); }; }()); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_generator.rs/issue_2024_1.js
JavaScript
_async_to_generator(function() { var sleep, result; return _ts_generator(this, function(_state) { switch(_state.label){ case 0: sleep = function() { return new Promise(function(resolve) { return setTimeout(function() { return resolve(undefined); }, 500); }); }; return [ 4, sleep() ]; case 1: result = _state.sent() || 'fallback'; console.log(result); return [ 2 ]; } }); })();
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_generator.rs/issue_7809.js
JavaScript
function a(fn) { return _a.apply(this, arguments); } function _a() { _a = _async_to_generator(function(fn) { return _ts_generator(this, function(_state) { switch(_state.label){ case 0: return [ 4, fn() ]; case 1: _state.sent().a = 1; return [ 2 ]; } }); }); return _a.apply(this, arguments); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_generator.rs/issue_831_3.js
JavaScript
export function myGenerator() { return _ts_generator(this, function(_state) { switch(_state.label){ case 0: return [ 5, _ts_values([ 1, 2, 3 ]) ]; case 1: _state.sent(); return [ 2 ]; } }); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_new_target.rs/issue_6259.js
JavaScript
(()=>{ var SomeError = /*#__PURE__*/ function _target(Error) { "use strict"; _inherits(SomeError, Error); function SomeError(issues) { _class_call_check(this, SomeError); var _this; _this = _call_super(this, SomeError); const actualProto = (this instanceof SomeError ? this.constructor : void 0).prototype; return _this; } return SomeError; }(_wrap_native_super(Error)); })();
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_object_super.rs/get_semantics_data_defined_on_parent.js
JavaScript
var _obj; const Base = { test: 1 }; const obj = _obj = { test: 2, get: function get() { return _get(_get_prototype_of(_obj), "test", this); } }; Object.setPrototypeOf(obj, Base);
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_object_super.rs/nested_object.js
JavaScript
var _obj; function f0() {} f0.prototype = _obj = { name: 'Nicholas', age: 29, job: 'Software Engineer', sayName: function sayName() { v0[args](1, { v9: (v7)=>_get(_get_prototype_of(_obj), "v3", this).call(this, v27), foo: a, done: 'a' }); } };
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_object_super.rs/nested_object_super_property_in_key.js
JavaScript
var _obj; const Hello = { toString: function toString() { return 'hello'; } }; const Outer = _obj = { constructor: function constructor() { const Inner = { [_get(_get_prototype_of(_obj), "toString", this).call(this)]: function() { return 'hello'; } }; return Inner; } }; Object.setPrototypeOf(Outer, Hello);
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_object_super.rs/set_semantics_data_defined_on_parent.js
JavaScript
var _obj; const Base = { test: 1 }; const obj = _obj = { test: 2, set: function set() { return _set(_get_prototype_of(_obj), "test", 3, this, true); } }; Object.setPrototypeOf(obj, Base);
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_object_super.rs/super_increment_postfix.js
JavaScript
var _obj; var Base = { test: "1" }; var obj = _obj = { bar: function bar() { var _super; return _set(_get_prototype_of(_obj), "test", (_super = +_get(_get_prototype_of(_obj), "test", this)) + 1, this, true), _super; } }; Object.setPrototypeOf(obj, Base);
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_object_super.rs/super_increment_postfix2.js
JavaScript
var _obj; var Base = { test: "1" }; var obj = _obj = { bar: function bar() { var _ref, _super; return _set(_get_prototype_of(_obj), _ref = test, (_super = +_get(_get_prototype_of(_obj), _ref, this)) + 1, this, true), _super; } }; Object.setPrototypeOf(obj, Base);
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_object_super.rs/super_increment_prefix.js
JavaScript
var _obj; var Base = { test: "1" }; var obj = _obj = { bar: function bar() { return _set(_get_prototype_of(_obj), "test", +_get(_get_prototype_of(_obj), "test", this) + 1, this, true); } }; Object.setPrototypeOf(obj, Base);
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_parameters.rs/babel_6057_simple.js
JavaScript
var a = 'bar'; function foo() { for(var _len = arguments.length, a = new Array(_len), _key = 0; _key < _len; _key++){ a[_key] = arguments[_key]; } return a; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_parameters.rs/default_before_last.js
JavaScript
function foo() { var _ref = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "foo", x = _ref.x, y = _ref.y, b = arguments.length > 1 ? arguments[1] : void 0; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_parameters.rs/default_iife_4253.js
JavaScript
var Ref = function Ref() { "use strict"; var id = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ++Ref.nextID; _class_call_check(this, Ref); this.id = id; }; Ref.nextID = 0;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_parameters.rs/default_iife_self.js
JavaScript
var Ref = function Ref() { "use strict"; var ref = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Ref; _class_call_check(this, Ref); this.ref = ref; }; var X = function X() { "use strict"; var x = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : foo; _class_call_check(this, X); this.x = x; };
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_parameters.rs/default_multiple.js
JavaScript
var t = function() { var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "foo", f = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 5; return e + " bar " + f; }; var a = function(e) { var f = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 5; return e + " bar " + f; };
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_parameters.rs/default_rest_1.js
JavaScript
var a = 1; function rest() { var b = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : a; for(var _len = arguments.length, a1 = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++){ a1[_key - 1] = arguments[_key]; } expect(b).toBe(1); } rest(undefined, 2);
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_parameters.rs/default_rest_2.js
JavaScript
var a = 1; function rest2() { var b = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : a; for(var _len = arguments.length, a1 = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++){ a1[_key - 1] = arguments[_key]; } expect(a1[0]).toBe(2); } rest2(undefined, 2);
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_parameters.rs/default_rest_3.js
JavaScript
var a = 1; function rest3() { var b = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : a; for(var _len = arguments.length, a1 = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++){ a1[_key - 1] = arguments[_key]; } expect(a1).toHaveLength(1); } rest3(undefined, 2);
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_parameters.rs/default_rest_mix.js
JavaScript
function fn(a1) { var a2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 4, _ref = arguments.length > 2 ? arguments[2] : void 0, a3 = _ref.a3, a4 = _ref.a4, a5 = arguments.length > 3 ? arguments[3] : void 0, _ref1 = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {}, a6 = _ref1.a6, a7 = _ref1.a7; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_parameters.rs/default_setter_complex.js
JavaScript
var obj = { set obj (param){ var _ref = param === void 0 ? {} : param, a = _ref.a, b = _ref.b; this.num = { a, b }; }, set arr (param){ var _ref1 = _sliced_to_array(param === void 0 ? [] : param, 2), x = _ref1[0], y = _ref1[1]; this.num = { x, y }; } };
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_parameters.rs/default_setter_noexec.js
JavaScript
var obj = { set field (num){ if (num === void 0) num = 1; this.num = num; } };
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_parameters.rs/default_single.js
JavaScript
var t = function() { var f = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "foo"; return f + " bar"; };
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_parameters.rs/destructuring_rest.js
JavaScript
// #3861 function t() { var x = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "default", _ref = arguments.length > 1 ? arguments[1] : void 0, a = _ref.a, b = _ref.b; for(var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++){ args[_key - 2] = arguments[_key]; } console.log(x, a, b, args); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_parameters.rs/fn_len_complex_assign.js
JavaScript
function test(param) { var _ref = param === void 0 ? {} : param, b = _ref.a; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_parameters.rs/fn_len_default_array_destructuring.js
JavaScript
function t(param) { var _ref = _sliced_to_array(param === void 0 ? [ 1, 2, 3 ] : param, 3), a = _ref[2]; return a; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_parameters.rs/fn_len_default_multiple.js
JavaScript
var t = function(e, f) { if (e === void 0) e = "foo"; if (f === void 0) f = 5; return e + " bar " + f; }; var a = function(e, f) { if (f === void 0) f = 5; return e + " bar " + f; };
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_parameters.rs/fn_len_default_single.js
JavaScript
var t = function(f) { if (f === void 0) f = "foo"; return f + " bar"; };
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_parameters.rs/fn_len_destructing_rest.js
JavaScript
function t(x, param) { if (x === void 0) x = "default"; var a = param.a, b = param.b; for(var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++){ args[_key - 2] = arguments[_key]; } console.log(x, a, b, args); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_parameters.rs/fn_len_rest_mix.js
JavaScript
function fn(a1, a2, param, a5, param1) { if (a2 === void 0) a2 = 4; var a3 = param.a3, a4 = param.a4; var _ref = param1 === void 0 ? {} : param1, a6 = _ref.a6, a7 = _ref.a7; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_parameters.rs/issue_169.js
JavaScript
class Foo { func(a) { var b = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Date.now(); return { a }; } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_parameters.rs/issue_227.js
JavaScript
export default function fn1() { for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){ args[_key] = arguments[_key]; } fn2(...args); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_parameters.rs/issue_254.js
JavaScript
export var someFunction = function() { var update = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false, action = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; };
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_parameters.rs/issue_2811.js
JavaScript
class Foo extends function() {} { constructor(){ var _this; var foo = function() { for(var _len = arguments.length, rest = new Array(_len), _key = 0; _key < _len; _key++){ rest[_key] = arguments[_key]; } return [ rest, _this ]; }; if (true) { console.log((super(), _this = this), foo()); } else { super(), _this = this; console.log(foo()); } } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_parameters.rs/issue_2825.js
JavaScript
var _this = this; var foo = function() { for(var _len = arguments.length, rest = new Array(_len), _key = 0; _key < _len; _key++){ rest[_key] = arguments[_key]; } return console.log(_this, rest); }; var bar = ()=>this;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_parameters.rs/issue_3471.js
JavaScript
var _this = this; class A { a = 1 + function() { for(var _len = arguments.length, a = new Array(_len), _key = 0; _key < _len; _key++){ a[_key] = arguments[_key]; } return a; }; b = (()=>{ var _this = this; return function() { for(var _len = arguments.length, b = new Array(_len), _key = 0; _key < _len; _key++){ b[_key] = arguments[_key]; } return b + _this; }; })(); static c = function() { let c = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 123; return c + _this; }; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_parameters.rs/issue_3569.js
JavaScript
export class TableView extends React.Component { constructor(props){ var _this; super(props), _this = this; this.getSearchForm = function() { let innerWidth = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0; _this.getProps(); }; } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_parameters.rs/issue_5030.js
JavaScript
var v0 = function(Array1, Int8Array) { for(var _len = arguments.length, Int32Array = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++){ Int32Array[_key - 2] = arguments[_key]; } return (NaN + Infinity) * Int32Array.length; }; console.log(v0(1, 2, 'hello', true, 7));
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_parameters.rs/issue_760.js
JavaScript
const initialState = 'foo'; export default function reducer() { let state = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : initialState, action = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_parameters.rs/parameters_regression_4333.js
JavaScript
var args = 'bar'; function foo() { for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){ args[_key] = arguments[_key]; } return args; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_parameters.rs/regression_4333.js
JavaScript
var args = 'bar'; function foo() { for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){ args[_key] = arguments[_key]; } return args; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_parameters.rs/regression_4348.js
JavaScript
function first() { for(var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++){ values[_key] = arguments[_key]; } var index = 0; return values[index++]; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_parameters.rs/regression_5787.js
JavaScript
function f(a) { for(var _len = arguments.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++){ rest[_key - 1] = arguments[_key]; } var b = rest[rest.length - 3]; var c = rest[rest.length - 2]; var d = rest[rest.length - 1]; return [ a, b, c, d ]; } function f(a) { for(var _len = arguments.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++){ rest[_key - 1] = arguments[_key]; } return rest[-1]; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_parameters.rs/regression_6057_simple.js
JavaScript
const a = 'bar'; function foo() { for(var _len = arguments.length, a = new Array(_len), _key = 0; _key < _len; _key++){ a[_key] = arguments[_key]; } return a; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_parameters.rs/rest_args_deoptimiazation.js
JavaScript
function x() { for(var _len = arguments.length, rest = new Array(_len), _key = 0; _key < _len; _key++){ rest[_key] = arguments[_key]; } arguments; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_parameters.rs/rest_binding_deoptimisation.js
JavaScript
var deepAssign = function() { for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){ args[_key] = arguments[_key]; } return args = []; };
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_parameters.rs/rest_in_top_level_arrow_1.js
JavaScript
const arrow = function() { for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){ args[_key] = arguments[_key]; } console.log(args); };
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_parameters.rs/rest_in_top_level_arrow_2.js
JavaScript
const arrow = ()=>function() { for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){ args[_key] = arguments[_key]; } console.log(args); };
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_parameters.rs/rest_in_top_level_arrow_3.js
JavaScript
const arrow = ()=>{ var _this = this; return function() { for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){ args[_key] = arguments[_key]; } console.log(_this, args); }; };
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_parameters.rs/rest_in_top_level_arrow_4.js
JavaScript
const arrow = ()=>{ var _this = this; return this, function() { for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){ args[_key] = arguments[_key]; } console.log(_this, args); }; };
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_parameters.rs/rest_in_top_level_arrow_nested_1.js
JavaScript
var _this = this; const arrow = function() { for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){ args[_key] = arguments[_key]; } return _this, ()=>{ var _this1 = _this; return function() { for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){ args[_key] = arguments[_key]; } console.log(_this1, args); }; }; };
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_parameters.rs/rest_length.js
JavaScript
var t = function(f) { for(var _len = arguments.length, items = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++){ items[_key - 1] = arguments[_key]; } items[0]; items[items.length - 1]; }; function t(f) { for(var _len = arguments.length, items = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++){ items[_key - 1] = arguments[_key]; } items; items[0]; items[items.length - 1]; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_parameters.rs/rest_multiple.js
JavaScript
var t = function(f) { for(var _len = arguments.length, items = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++){ items[_key - 1] = arguments[_key]; } var x = f; x = items[0]; x = items[1]; }; function t(f) { for(var _len = arguments.length, items = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++){ items[_key - 1] = arguments[_key]; } var x = f; x = items[0]; x = items[1]; } function u(f, g) { for(var _len = arguments.length, items = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++){ items[_key - 2] = arguments[_key]; } var x = f; var y = g; x[12] = items[0]; y.prop = items[1]; var z = items[2] | 0 || 12; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_parameters.rs/rest_nested_iife.js
JavaScript
function broken(x) { for(var _len = arguments.length, foo = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++){ foo[_key - 1] = arguments[_key]; } if (true) { let Foo = /*#__PURE__*/ function(Bar1) { "use strict"; _inherits(Foo, Bar1); function Foo() { _class_call_check(this, Foo); return _call_super(this, Foo, arguments); } return Foo; }(Bar); return hello.apply(void 0, _to_consumable_array(foo)); } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_parameters.rs/rest_patterns.js
JavaScript
function foo() { for(var _len = arguments.length, _tmp = new Array(_len), _key = 0; _key < _len; _key++){ _tmp[_key] = arguments[_key]; } var _tmp1 = _sliced_to_array(_tmp, 1), a = _tmp1[0]; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_spread.rs/arguments.js
JavaScript
function foo() { return bar.apply(void 0, arguments); } function bar(one, two, three) { return [ one, two, three ]; } foo("foo", "bar");
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_spread.rs/arguments_array.js
JavaScript
function foo() { return bar(Array.prototype.slice.call(arguments)); } function bar(one, two, three) { return [ one, two, three ]; } foo("foo", "bar");
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_spread.rs/arguments_concat.js
JavaScript
function foo() { return bar.apply(void 0, [ "test" ].concat(Array.prototype.slice.call(arguments))); } function bar(one, two, three) { return [ one, two, three ]; } foo("foo", "bar");
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_spread.rs/array_literal_first.js
JavaScript
var lyrics = _to_consumable_array(parts).concat([ "head", "and", "toes" ]);
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_spread.rs/array_literal_middle.js
JavaScript
var a = [ b ].concat(_to_consumable_array(c), [ d ]);
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_spread.rs/array_literal_multiple.js
JavaScript
var a = [ b ].concat(_to_consumable_array(c), [ d, e ], _to_consumable_array(f));
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_spread.rs/array_literal_with_hole.js
JavaScript
var arr = [ 'a', , 'b' ].concat(_to_consumable_array(c));
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_spread.rs/array_literals.js
JavaScript
var lyrics = [ "head", "and", "toes" ].concat(_to_consumable_array(parts));
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_spread.rs/contexted_computed_method_call_multiple_args.js
JavaScript
var _obj; (_obj = obj)[method].apply(_obj, [ foo, bar ].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/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/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/custom_array.js
JavaScript
[ a, b, c ].concat(_to_consumable_array(d), [ e ]);
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_spread.rs/custom_array_empty.js
JavaScript
[ a, , b, c ].concat(_to_consumable_array(d), [ , , e ]);
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_spread.rs/custom_call.js
JavaScript
ca.apply(void 0, [ a, b, c ].concat(_to_consumable_array(d), [ e ]));
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_spread.rs/custom_call_multi_spread.js
JavaScript
ca.apply(void 0, [ a, b ].concat(_to_consumable_array(d), [ e, f ], _to_consumable_array(h)));
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_spread.rs/custom_call_noop.js
JavaScript
ca(a, b, c, d, e);
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_spread.rs/custom_new_noop.js
JavaScript
new C(a, b, c, c, d, e);
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_spread.rs/issue_270.js
JavaScript
var _instance; (_instance = instance)[name].apply(_instance, _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/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/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/method_call_multiple_args.js
JavaScript
add.apply(void 0, [ 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/regression_10416.js
JavaScript
const E_ARR = []; export default function() { const someVar = E_ARR; return _to_consumable_array(someVar); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_spread.rs/regression_issue_8907_modified.js
JavaScript
const arr = []; arr.concat = ()=>{ throw new Error('Should not be called'); }; const x = _to_consumable_array(arr);
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_spread.rs/regression_t6761.js
JavaScript
function fn() {} var args = [ 1, 2, 3 ]; var obj = { obj: { fn } }; switch(true){ case true: var _obj_obj; (_obj_obj = obj.obj).fn.apply(_obj_obj, _to_consumable_array(args)); break; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_spread.rs/spread_arguments.js
JavaScript
function foo() { return bar.apply(void 0, arguments); } function bar(one, two, three) { return [ one, two, three ]; } foo("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_arguments_concat.js
JavaScript
function foo() { return bar.apply(void 0, [ "test" ].concat(Array.prototype.slice.call(arguments))); } function bar(one, two, three) { return [ one, two, three ]; } foo("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_array_literal_middle.js
JavaScript
var a = [ b ].concat(_to_consumable_array(c), [ d ]);
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_spread.rs/spread_array_literal_with_hole.js
JavaScript
var arr = [ 'a', , 'b' ].concat(_to_consumable_array(c));
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_spread.rs/spread_array_literals.js
JavaScript
var lyrics = [ "head", "and", "toes" ].concat(_to_consumable_array(parts));
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/__swc_snapshots__/tests/es2015_spread.rs/spread_contexted_computed_method_call_single_arg.js
JavaScript
var _obj; (_obj = obj)[method].apply(_obj, _to_consumable_array(args));
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University