| | |
| | | var _core = require("@babel/core"); |
| | | |
| | | var _default = (0, _helperPluginUtils.declare)((api, options) => { |
| | | var _api$assumption, _api$assumption2; |
| | | |
| | | api.assertVersion(7); |
| | | const { |
| | | method, |
| | | module |
| | | } = options; |
| | | const noNewArrows = api.assumption("noNewArrows"); |
| | | const noNewArrows = (_api$assumption = api.assumption("noNewArrows")) != null ? _api$assumption : true; |
| | | const ignoreFunctionLength = (_api$assumption2 = api.assumption("ignoreFunctionLength")) != null ? _api$assumption2 : false; |
| | | |
| | | if (method && module) { |
| | | return { |
| | |
| | | |
| | | (0, _helperRemapAsyncToGenerator.default)(path, { |
| | | wrapAsync |
| | | }, noNewArrows); |
| | | }, noNewArrows, ignoreFunctionLength); |
| | | } |
| | | |
| | | } |
| | |
| | | if (!path.node.async || path.node.generator) return; |
| | | (0, _helperRemapAsyncToGenerator.default)(path, { |
| | | wrapAsync: state.addHelper("asyncToGenerator") |
| | | }, noNewArrows); |
| | | }, noNewArrows, ignoreFunctionLength); |
| | | } |
| | | |
| | | } |