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.

30 lines
773 B

4 years ago
  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;