You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
595 B

4 years ago
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = _default;
  6. var _helperCreateRegexpFeaturesPlugin = require("@babel/helper-create-regexp-features-plugin");
  7. function _default(core, options) {
  8. const {
  9. runtime = true
  10. } = options;
  11. if (typeof runtime !== "boolean") {
  12. throw new Error("The 'runtime' option must be boolean");
  13. }
  14. return (0, _helperCreateRegexpFeaturesPlugin.createRegExpFeaturePlugin)({
  15. name: "transform-named-capturing-groups-regex",
  16. feature: "namedCaptureGroups",
  17. options: {
  18. runtime
  19. }
  20. });
  21. }