Last change
on this file since 6a3a178 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
743 bytes
|
Line | |
---|
1 | "use strict";
|
---|
2 |
|
---|
3 | Object.defineProperty(exports, "__esModule", {
|
---|
4 | value: true
|
---|
5 | });
|
---|
6 | exports.enableFeature = enableFeature;
|
---|
7 | exports.hasFeature = hasFeature;
|
---|
8 | exports.runtimeKey = exports.featuresKey = exports.FEATURES = void 0;
|
---|
9 | const FEATURES = Object.freeze({
|
---|
10 | unicodeFlag: 1 << 0,
|
---|
11 | dotAllFlag: 1 << 1,
|
---|
12 | unicodePropertyEscape: 1 << 2,
|
---|
13 | namedCaptureGroups: 1 << 3
|
---|
14 | });
|
---|
15 | exports.FEATURES = FEATURES;
|
---|
16 | const featuresKey = "@babel/plugin-regexp-features/featuresKey";
|
---|
17 | exports.featuresKey = featuresKey;
|
---|
18 | const runtimeKey = "@babel/plugin-regexp-features/runtimeKey";
|
---|
19 | exports.runtimeKey = runtimeKey;
|
---|
20 |
|
---|
21 | function enableFeature(features, feature) {
|
---|
22 | return features | feature;
|
---|
23 | }
|
---|
24 |
|
---|
25 | function hasFeature(features, feature) {
|
---|
26 | return !!(features & feature);
|
---|
27 | } |
---|
Note:
See
TracBrowser
for help on using the repository browser.