BVB Source Codes

reactide Show index.js Source code

Return Download reactide: download index.js Source code - Download reactide Source code - Type:.js
  1. "use strict";
  2.  
  3. exports.__esModule = true;
  4.  
  5. exports.default = function (_ref) {
  6.   var t = _ref.types;
  7.  
  8.   var yieldStarVisitor = {
  9.     Function: function Function(path) {
  10.       path.skip();
  11.     },
  12.     YieldExpression: function YieldExpression(_ref2, state) {
  13.       var node = _ref2.node;
  14.  
  15.       if (!node.delegate) return;
  16.       var callee = state.addHelper("asyncGeneratorDelegate");
  17.       node.argument = t.callExpression(callee, [t.callExpression(state.addHelper("asyncIterator"), [node.argument]), t.memberExpression(state.addHelper("asyncGenerator"), t.identifier("await"))]);
  18.     }
  19.   };
  20.  
  21.   return {
  22.     inherits: require("babel-plugin-syntax-async-generators"),
  23.     visitor: {
  24.       Function: function Function(path, state) {
  25.         if (!path.node.async || !path.node.generator) return;
  26.  
  27.         path.traverse(yieldStarVisitor, state);
  28.  
  29.         (0, _babelHelperRemapAsyncToGenerator2.default)(path, state.file, {
  30.           wrapAsync: t.memberExpression(state.addHelper("asyncGenerator"), t.identifier("wrap")),
  31.           wrapAwait: t.memberExpression(state.addHelper("asyncGenerator"), t.identifier("await"))
  32.         });
  33.       }
  34.     }
  35.   };
  36. };
  37.  
  38. var _babelHelperRemapAsyncToGenerator = require("babel-helper-remap-async-to-generator");
  39.  
  40. var _babelHelperRemapAsyncToGenerator2 = _interopRequireDefault(_babelHelperRemapAsyncToGenerator);
  41.  
  42. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  43.  
  44. module.exports = exports["default"];
downloadindex.js Source code - Download reactide Source code
Related Source Codes/Software:
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
postal - 2017-06-11
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top