index.js 773 B

12345678910111213141516171819202122232425262728293031
  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 = (0, _helperPluginUtils.declare)((api, options) => {
  9. api.assertVersion(7);
  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: "proposal-unicode-property-regex",
  18. feature: "unicodePropertyEscape",
  19. options: {
  20. useUnicodeFlag
  21. }
  22. });
  23. });
  24. exports.default = _default;