blob: e9169ccb09a982fdaa272267d125ccab6177e0ef (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
"use strict";
exports.__esModule = true;
exports.default = function () {
return {
inherits: require("babel-plugin-syntax-async-functions"),
visitor: {
Function: function Function(path, state) {
if (!path.node.async || path.node.generator) return;
(0, _babelHelperRemapAsyncToGenerator2.default)(path, state.file, {
wrapAsync: state.addHelper("asyncToGenerator")
});
}
}
};
};
var _babelHelperRemapAsyncToGenerator = require("babel-helper-remap-async-to-generator");
var _babelHelperRemapAsyncToGenerator2 = _interopRequireDefault(_babelHelperRemapAsyncToGenerator);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
module.exports = exports["default"];
|