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.
26 lines
595 B
26 lines
595 B
4 years ago
|
"use strict";
|
||
|
|
||
|
Object.defineProperty(exports, "__esModule", {
|
||
|
value: true
|
||
|
});
|
||
|
exports.default = _default;
|
||
|
|
||
|
var _helperCreateRegexpFeaturesPlugin = require("@babel/helper-create-regexp-features-plugin");
|
||
|
|
||
|
function _default(core, options) {
|
||
|
const {
|
||
|
runtime = true
|
||
|
} = options;
|
||
|
|
||
|
if (typeof runtime !== "boolean") {
|
||
|
throw new Error("The 'runtime' option must be boolean");
|
||
|
}
|
||
|
|
||
|
return (0, _helperCreateRegexpFeaturesPlugin.createRegExpFeaturePlugin)({
|
||
|
name: "transform-named-capturing-groups-regex",
|
||
|
feature: "namedCaptureGroups",
|
||
|
options: {
|
||
|
runtime
|
||
|
}
|
||
|
});
|
||
|
}
|