index.js 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = void 0;
  6. function _helperPluginUtils() {
  7. const data = require("@babel/helper-plugin-utils");
  8. _helperPluginUtils = function () {
  9. return data;
  10. };
  11. return data;
  12. }
  13. function _helperBuilderBinaryAssignmentOperatorVisitor() {
  14. const data = _interopRequireDefault(require("@babel/helper-builder-binary-assignment-operator-visitor"));
  15. _helperBuilderBinaryAssignmentOperatorVisitor = function () {
  16. return data;
  17. };
  18. return data;
  19. }
  20. function _core() {
  21. const data = require("@babel/core");
  22. _core = function () {
  23. return data;
  24. };
  25. return data;
  26. }
  27. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  28. var _default = (0, _helperPluginUtils().declare)(api => {
  29. api.assertVersion(7);
  30. return {
  31. name: "transform-exponentiation-operator",
  32. visitor: (0, _helperBuilderBinaryAssignmentOperatorVisitor().default)({
  33. operator: "**",
  34. build(left, right) {
  35. return _core().types.callExpression(_core().types.memberExpression(_core().types.identifier("Math"), _core().types.identifier("pow")), [left, right]);
  36. }
  37. })
  38. };
  39. });
  40. exports.default = _default;