features.js 882 B

123456789101112131415161718192021222324252627282930
  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 = exports.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. const featuresKey = exports.featuresKey = "@babel/plugin-regexp-features/featuresKey";
  21. const runtimeKey = exports.runtimeKey = "@babel/plugin-regexp-features/runtimeKey";
  22. function enableFeature(features, feature) {
  23. return features | feature;
  24. }
  25. function hasFeature(features, feature) {
  26. return !!(features & feature);
  27. }
  28. //# sourceMappingURL=features.js.map