MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / escapeRegExp

Function escapeRegExp

src/resolution/alias-binding.ts:35–37  ·  view source on GitHub ↗
(s: string)

Source from the content-addressed store, hash-verified

33const BARE_ALIAS_RE = /^=\s*([A-Za-z_$][\w$]*)\s*(?:as\s+[\w.<>[\]]+\s*)?;?$/;
34
35function escapeRegExp(s: string): string {
36 return s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
37}
38
39/**
40 * The symbol name an alias binding forwards to, or null when the initializer is

Callers 1

aliasTargetNameFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected