features.js 917 B

123456789101112131415161718192021222324252627282930313233
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.FEATURES = void 0;
  6. exports.enableFeature = enableFeature;
  7. exports.featuresKey = void 0;
  8. exports.hasFeature = hasFeature;
  9. exports.runtimeKey = void 0;
  10. const FEATURES = Object.freeze({
  11. unicodeFlag: 1 << 0,
  12. dotAllFlag: 1 << 1,
  13. unicodePropertyEscape: 1 << 2,
  14. namedCaptureGroups: 1 << 3,
  15. unicodeSetsFlag_syntax: 1 << 4,
  16. unicodeSetsFlag: 1 << 5,
  17. duplicateNamedCaptureGroups: 1 << 6,
  18. modifiers: 1 << 7
  19. });
  20. exports.FEATURES = FEATURES;
  21. const featuresKey = "@babel/plugin-regexp-features/featuresKey";
  22. exports.featuresKey = featuresKey;
  23. const runtimeKey = "@babel/plugin-regexp-features/runtimeKey";
  24. exports.runtimeKey = runtimeKey;
  25. function enableFeature(features, feature) {
  26. return features | feature;
  27. }
  28. function hasFeature(features, feature) {
  29. return !!(features & feature);
  30. }
  31. //# sourceMappingURL=features.js.map