(text: string)
| 461 | * is read as pattern syntax and may not compile at all. |
| 462 | */ |
| 463 | export function escapeRegExp(text: string): string { |
| 464 | // Most text here is an identifier, with nothing to escape. |
| 465 | return REGEXP_SYNTAX.test(text) ? text.replace(/[.*+?^${}()|[\]\\]/g, '\\$&') : text; |
| 466 | } |
| 467 | |
| 468 | /** |
| 469 | * An empty lock file younger than this is still being written by the process |
no outgoing calls
no test coverage detected