While it may appear that this should be done by es2015-function-name, another way to think about it is that es2015-function-name implements the naming that javascript engines are supposed to do; and javascript engines cannot name function expressions that are the object of a member expression.
27 lines
533 B
JavaScript
27 lines
533 B
JavaScript
function foo() {
|
|
var _this = this;
|
|
|
|
arr.map(function (x) {
|
|
babelHelpers.newArrowCheck(this, _this);
|
|
return x * x;
|
|
}.bind(this));
|
|
var f = function f(x, y) {
|
|
babelHelpers.newArrowCheck(this, _this);
|
|
return x * y;
|
|
}.bind(this);
|
|
(function () {
|
|
var _this2 = this;
|
|
|
|
return function () {
|
|
babelHelpers.newArrowCheck(this, _this2);
|
|
return this;
|
|
}.bind(this);
|
|
})();
|
|
return {
|
|
g: function g() {
|
|
babelHelpers.newArrowCheck(this, _this);
|
|
return this;
|
|
}.bind(this)
|
|
};
|
|
}
|