A TypeScript-first library for building maintainable regular expressions using a structured, composable DSL. Version 1.8.2 (September 2024) supports Unicode mode, named capture groups, lookahead/lookbehind assertions, and tree-shaking optimizations. Unlike raw regex strings or other builders (e.g., verbal-expressions), ts-regex-builder provides full TypeScript type safety, automatic escaping, and seamless interop with native RegExp. Released under the Callstack organization with monthly updates.
npm install ts-regex-builderNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows regex building with constructs like capture, choiceOf, repeat, and charRange, plus usage of test() and exec().
Use import syntax or switch to dynamic import().
Replace any() with '.' in regex sequences.
Ensure strings used in sequences are escaped if needed, or use construct methods.
Use Node 18+ or configure bundler to polyfill.
No fix needed; name is stable.
Upgrade to Node >= 18 and use ESM (type: 'module' in package.json or .mjs extension).
Change to import { buildRegExp } from 'ts-regex-builder'Ensure regex constructs are used within buildRegExp arrays.
No dependency data recorded yet.