mirror of
https://github.com/swc-project/swc.git
synced 2024-12-19 11:42:13 +03:00
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);
|