MCPcopy Index your code
hub / github.com/conwnet/github1s / buildRepoPattern

Function buildRepoPattern

extensions/github1s/src/adapters/sourcegraph/common.ts:64–66  ·  view source on GitHub ↗
(repo: string)

Source from the content-addressed store, hash-verified

62export const escapeRegexp = (text: string): string => text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
63
64export const buildRepoPattern = (repo: string) => {
65 return `^${escapeRegexp(repo)}$`;
66};

Callers 2

getSymbolPositionsFunction · 0.90

Calls 1

escapeRegexpFunction · 0.85

Tested by

no test coverage detected