webpack/test/helpers/supportsArrowFunctionExpres...

13 lines
227 B
JavaScript
Raw Normal View History

"use strict";
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;
2024-07-31 15:37:05 +08:00
} catch (_err) {
2016-12-23 17:13:15 +08:00
return false;
}
};