mirror of
https://github.com/swc-project/swc.git
synced 2024-12-18 11:11:30 +03:00
53b031b019
swc_ecma_transforms_base: - `resolver`: Handle constructor properties correctly. (#2021) swc_ecma_transforms_compat: - `block_scoping`: Handle arrows in loops. (#2027) - `block_scoping`: Handle nested for loops with function between them. (#2027) - `regenerator`: Handle rhs of `||` correctly. (#2024) swc: - Add a test for #1734. (#1734)
16 lines
361 B
JavaScript
16 lines
361 B
JavaScript
var _loop = function(key) {
|
|
controller[key] = function(c) {
|
|
for(var _len = arguments.length, d = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++){
|
|
d[_key - 1] = arguments[_key];
|
|
}
|
|
console.log(keys[key]);
|
|
};
|
|
};
|
|
var keys = {
|
|
a: 1,
|
|
b: 2
|
|
};
|
|
var controller = {
|
|
};
|
|
for(var key in keys)_loop(key);
|