MCPcopy Index your code
hub / github.com/sourcebot-dev/sourcebot / globToFileRegexp

Function globToFileRegexp

packages/web/src/features/tools/grep.ts:18–21  ·  view source on GitHub ↗
(glob: string)

Source from the content-addressed store, hash-verified

16const TRUNCATION_MESSAGE = `(Results truncated. Consider using a more specific path or pattern, specifying a repo, or increasing the limit.)`;
17
18function globToFileRegexp(glob: string): string {
19 const re = globToRegexp(glob, { extended: true, globstar: true });
20 return re.source.replace(/^\^/, '');
21}
22
23const grepShape = {
24 pattern: z

Callers 1

grep.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected