(text: string)
| 437 | * is read as pattern syntax and may not compile at all. |
| 438 | */ |
| 439 | export function escapeRegExp(text: string): string { |
| 440 | // Most text here is an identifier, with nothing to escape. |
| 441 | return REGEXP_SYNTAX.test(text) ? text.replace(/[.*+?^${}()|[\]\\]/g, '\\$&') : text; |
| 442 | } |
| 443 | |
| 444 | /** |
| 445 | * An empty lock file younger than this is still being written by the process |
no outgoing calls
no test coverage detected