index.js 775 B

1234567891011121314151617181920212223242526272829303132
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = void 0;
  6. var _helperCreateRegexpFeaturesPlugin = require("@babel/helper-create-regexp-features-plugin");
  7. var _helperPluginUtils = require("@babel/helper-plugin-utils");
  8. var _default = (0, _helperPluginUtils.declare)((api, options) => {
  9. const {
  10. runtime
  11. } = options;
  12. if (runtime !== undefined && typeof runtime !== "boolean") {
  13. throw new Error("The 'runtime' option must be boolean");
  14. }
  15. return (0, _helperCreateRegexpFeaturesPlugin.createRegExpFeaturePlugin)({
  16. name: "transform-named-capturing-groups-regex",
  17. feature: "namedCaptureGroups",
  18. options: {
  19. runtime
  20. }
  21. });
  22. });
  23. exports.default = _default;
  24. //# sourceMappingURL=index.js.map