{"library":"regexpu-core","title":"regexpu-core","description":"regexpu-core is the core module of regexpu, a transpiler that converts ES2015 Unicode regular expressions (with the `u` and `v` flags) into ES5-compatible patterns. Current stable version is 6.4.0. It supports features like Unicode property escapes, dotAll flag, named capture groups, and the `v` flag (unicodeSetsFlag), with options to either pass through or transform them. Released on npm with TypeScript types, it has a steady release cadence, updated for Unicode 15.1. Key differentiator: focused on core regexp rewriting without the full regexpu CLI, used by Babel and other tools.","language":"javascript","status":"active","last_verified":"Fri May 01","install":{"commands":["npm install regexpu-core"],"cli":null},"imports":["import rewritePattern from 'regexpu-core'","import { rewritePattern } from 'regexpu-core'","import type { RewritePatternOptions } from 'regexpu-core'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import rewritePattern from 'regexpu-core';\n\n// Transform a Unicode regex with 'u' flag to ES5\nconst pattern = '\\\\p{ASCII_Hex_Digit}+';\nconst flags = 'u';\nconst result = rewritePattern(pattern, flags, {\n  unicodePropertyEscapes: 'transform',\n  unicodeFlag: 'transform',\n});\nconsole.log(result);\n// E.g.: '(?:[0-9A-Fa-f])+'","lang":"typescript","description":"Shows basic usage of rewritePattern to transpile a Unicode property escape regex into ES5-compatible pattern.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}