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