features.js.map 1.8 KB

1
  1. {"version":3,"names":["FEATURES","Object","freeze","unicodeFlag","dotAllFlag","unicodePropertyEscape","namedCaptureGroups","unicodeSetsFlag_syntax","unicodeSetsFlag","duplicateNamedCaptureGroups","featuresKey","runtimeKey","enableFeature","features","feature","hasFeature"],"sources":["../src/features.ts"],"sourcesContent":["export const FEATURES = Object.freeze({\n unicodeFlag: 1 << 0,\n dotAllFlag: 1 << 1,\n unicodePropertyEscape: 1 << 2,\n namedCaptureGroups: 1 << 3,\n unicodeSetsFlag_syntax: 1 << 4,\n unicodeSetsFlag: 1 << 5,\n duplicateNamedCaptureGroups: 1 << 6,\n});\n\n// We can't use a symbol because this needs to always be the same, even if\n// this package isn't deduped by npm. e.g.\n// - node_modules/\n// - @babel/plugin-regexp-features\n// - @babel/plugin-proposal-unicode-property-regex\n// - node_modules\n// - @babel-plugin-regexp-features\nexport const featuresKey = \"@babel/plugin-regexp-features/featuresKey\";\nexport const runtimeKey = \"@babel/plugin-regexp-features/runtimeKey\";\n\ntype FeatureType = typeof FEATURES[keyof typeof FEATURES];\n\nexport function enableFeature(features: number, feature: FeatureType): number {\n return features | feature;\n}\n\nexport function hasFeature(features: number, feature: FeatureType) {\n return !!(features & feature);\n}\n"],"mappings":";;;;;;;;;;AAAO,MAAMA,QAAQ,GAAGC,MAAM,CAACC,MAAP,CAAc;EACpCC,WAAW,EAAE,KAAK,CADkB;EAEpCC,UAAU,EAAE,KAAK,CAFmB;EAGpCC,qBAAqB,EAAE,KAAK,CAHQ;EAIpCC,kBAAkB,EAAE,KAAK,CAJW;EAKpCC,sBAAsB,EAAE,KAAK,CALO;EAMpCC,eAAe,EAAE,KAAK,CANc;EAOpCC,2BAA2B,EAAE,KAAK;AAPE,CAAd,CAAjB;;AAiBA,MAAMC,WAAW,GAAG,2CAApB;;AACA,MAAMC,UAAU,GAAG,0CAAnB;;;AAIA,SAASC,aAAT,CAAuBC,QAAvB,EAAyCC,OAAzC,EAAuE;EAC5E,OAAOD,QAAQ,GAAGC,OAAlB;AACD;;AAEM,SAASC,UAAT,CAAoBF,QAApB,EAAsCC,OAAtC,EAA4D;EACjE,OAAO,CAAC,EAAED,QAAQ,GAAGC,OAAb,CAAR;AACD"}