@nxworker/workspace
Version:
Nx plugin providing generators for managing workspace files, including the move-file generator for safely moving files between projects while updating all imports
10 lines (9 loc) • 454 B
TypeScript
/**
* Escape characters with special meaning outside character classes.
* Use a simple backslash escape when it’s always valid.
* Prevents ReDoS (Regular Expression Denial of Service) attacks
* @remarks To escape character classes, use `RegExp.escape` or a `core-js-pure` polyfill.
* @param str - The string to escape
* @returns The escaped string safe for use in regular expressions
*/
export declare function escapeRegex(str: string): string;