globToRegExp
globToRegExp(
glob):RegExp
Defined in: _worktrees/docs-release/gaunt-sloth/packages/agent/src/tools/gthGrepTool.ts:185
Compile an include glob (matched against a file’s basename in the JS fallback) to a RegExp.
Supports *, ?, and {a,b,c} brace alternation, e.g. *.ts, *.{ts,tsx}.
NOTE (rg-vs-JS divergence): this matches the basename only, whereas rg applies --glob with full
gitignore-style path-glob semantics (a glob can match against the path, not just the basename).
For the common *.ext case the two agree; more elaborate globs may differ between the two paths.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”RegExp