You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
743 B

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