index.js 831 B

1234567891011121314151617181920212223242526
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = void 0;
  6. var _helperCreateRegexpFeaturesPlugin = require("@babel/helper-create-regexp-features-plugin");
  7. var _helperPluginUtils = require("@babel/helper-plugin-utils");
  8. var _default = exports.default = (0, _helperPluginUtils.declare)((api, options) => {
  9. api.assertVersion("^7.0.0-0 || >8.0.0-alpha <8.0.0-beta");
  10. const {
  11. useUnicodeFlag = true
  12. } = options;
  13. if (typeof useUnicodeFlag !== "boolean") {
  14. throw new Error(".useUnicodeFlag must be a boolean, or undefined");
  15. }
  16. return (0, _helperCreateRegexpFeaturesPlugin.createRegExpFeaturePlugin)({
  17. name: "transform-unicode-property-regex",
  18. feature: "unicodePropertyEscape",
  19. options: {
  20. useUnicodeFlag
  21. }
  22. });
  23. });
  24. //# sourceMappingURL=index.js.map