dry up array comprehension and arrow functions by introducing an alias-functions transformer
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
function add() {
|
||||
var _arguments = arguments;
|
||||
return [1, 2, 3].map(function () {
|
||||
return [1, 2, 3].map(function (i) {
|
||||
return i * _arguments[0];
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
function add() {
|
||||
var _this = this;
|
||||
return [1, 2, 3].map(function () {
|
||||
return [1, 2, 3].map(function (i) {
|
||||
return i * _this.multiplier;
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user