UNPKG

743 BJavaScriptView Raw
1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports.enableFeature = enableFeature;
7exports.hasFeature = hasFeature;
8exports.runtimeKey = exports.featuresKey = exports.FEATURES = void 0;
9const FEATURES = Object.freeze({
10 unicodeFlag: 1 << 0,
11 dotAllFlag: 1 << 1,
12 unicodePropertyEscape: 1 << 2,
13 namedCaptureGroups: 1 << 3
14});
15exports.FEATURES = FEATURES;
16const featuresKey = "@babel/plugin-regexp-features/featuresKey";
17exports.featuresKey = featuresKey;
18const runtimeKey = "@babel/plugin-regexp-features/runtimeKey";
19exports.runtimeKey = runtimeKey;
20
21function enableFeature(features, feature) {
22 return features | feature;
23}
24
25function hasFeature(features, feature) {
26 return !!(features & feature);
27}
\No newline at end of file