features.js 898 B

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