escapeRegex function ✓ 100.0%
Last updated: 2026-03-02T15:32:34.984Z
Metrics
LOC: 3
Complexity: 1
Params: 1
Coverage: 100.0% (1/1 lines, 12x executed)
Signature
escapeRegex(s: string): : string
Source Code
function escapeRegex(s: string): string {
return s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
}
No outgoing dependencies.
Impact (Incoming)
| Source | Type |
|---|---|
| matchesRule | calls |