MCPcopy Create free account
hub / github.com/angular/angular / escapeRegExp

Function escapeRegExp

packages/compiler-cli/preprocessor/test/utils.ts:592–594  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

590}
591
592function escapeRegExp(str: string): string {
593 return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
594}
595
596export function checkMatch(actual: string, expected: string): boolean {
597 if (!expected.includes('…')) {

Callers 2

buildChunkMatcherFunction · 0.90
checkMatchFunction · 0.70

Calls 1

replaceMethod · 0.45

Tested by

no test coverage detected