@babel/plugin-transform-named-capturing-groups-regex
Version:
Compile regular expressions using named groups to ES5.
22 lines (19 loc) • 584 B
JavaScript
import { createRegExpFeaturePlugin } from '@babel/helper-create-regexp-features-plugin';
import { declare } from '@babel/helper-plugin-utils';
const index = declare((api, options) => {
const {
runtime
} = options;
if (runtime !== undefined && typeof runtime !== "boolean") {
throw new Error("The 'runtime' option must be boolean");
}
return createRegExpFeaturePlugin({
name: "transform-named-capturing-groups-regex",
feature: "namedCaptureGroups",
options: {
runtime
}
});
});
export { index as default };
//# sourceMappingURL=index.js.map