MCPcopy Index your code
hub / github.com/rtfpessoa/diff2html / escapeForRegExp

Function escapeForRegExp

src/utils.ts:29–31  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

27 * Escapes all required characters for safe usage inside a RegExp
28 */
29export function escapeForRegExp(str: string): string {
30 return str.replace(regex, '\\$&');
31}
32
33/**
34 * Converts all '\' in @path to unix style '/'

Callers 2

getFilenameFunction · 0.90
utils-tests.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…