MCPcopy Create free account
hub / github.com/Effect-TS/effect / escapeRegExp

Function escapeRegExp

packages/tools/jsdocs/src/Jsdocs.ts:506–508  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

504}
505
506function escapeRegExp(value: string): string {
507 return value.replace(/[|\\{}()[\]^$+?.]/g, "\\$&")
508}
509
510function globToRegExp(glob: string): RegExp {
511 let source = "^"

Callers 1

globToRegExpFunction · 0.70

Calls 1

replaceMethod · 0.45

Tested by

no test coverage detected