MCPcopy Create free account
hub / github.com/Dart-Code/Dart-Code / escapeRegExp

Function escapeRegExp

src/shared/utils.ts:24–26  ·  view source on GitHub ↗
(input: string)

Source from the content-addressed store, hash-verified

22}
23
24export function escapeRegExp(input: string): string {
25 return input.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string
26}
27
28export class PromiseCompleter<T> {
29 public promise: Promise<T>;

Callers 4

getLaunchConfigFunction · 0.90
makeRegexForTestsFunction · 0.90
dartdocs.tsFile · 0.90
debugger.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected