webpack/test/helpers/supportsArrowFunctionExpres...

11 lines
209 B
JavaScript
Raw Normal View History

2016-12-23 17:13:15 +08:00
module.exports = function supportArrowFunctionExpression() {
try {
2019-08-22 19:26:45 +08:00
eval(
"var foo = function(fn) {return fn.toString()}; foo(() => {return 'a'})"
);
2016-12-23 17:13:15 +08:00
return true;
2019-08-22 19:26:45 +08:00
} catch (e) {
2016-12-23 17:13:15 +08:00
return false;
}
};