index.js 1.3 KB

12345678910111213141516171819202122232425
  1. "use strict";
  2. exports.__esModule = true;
  3. exports.default = void 0;
  4. var handlers = _interopRequireWildcard(require("./handlers"));
  5. var _one = _interopRequireDefault(require("./one"));
  6. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  7. function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
  8. function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
  9. const h = {
  10. handlers
  11. };
  12. function toBabelAST(tree) {
  13. return (0, _one.default)(h, tree);
  14. }
  15. var _default = toBabelAST;
  16. exports.default = _default;