index.js 747 B

1234567891011121314151617181920212223242526272829303132
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = void 0;
  6. var _helperPluginUtils = require("@babel/helper-plugin-utils");
  7. function remover({
  8. node
  9. }) {
  10. var _extra$raw;
  11. const {
  12. extra
  13. } = node;
  14. if (extra != null && (_extra$raw = extra.raw) != null && _extra$raw.includes("_")) {
  15. extra.raw = extra.raw.replace(/_/g, "");
  16. }
  17. }
  18. var _default = (0, _helperPluginUtils.declare)(api => {
  19. api.assertVersion(7);
  20. return {
  21. name: "transform-numeric-separator",
  22. inherits: require("@babel/plugin-syntax-numeric-separator").default,
  23. visitor: {
  24. NumericLiteral: remover,
  25. BigIntLiteral: remover
  26. }
  27. };
  28. });
  29. exports.default = _default;
  30. //# sourceMappingURL=index.js.map