---
url: 'https://adk.nht.io/api/batteries/sandbox/node/functions/loadGlobToRegex.md'
---

# Function: loadGlobToRegex()

```ts
function loadGlobToRegex(): Promise<(glob: string) => string>;
```

Defined in: [src/batteries/sandbox/node/fs\_node.ts:20](https://github.com/NHTIO/ADK/blob/v1.20260824.1/src/src/batteries/sandbox/node/fs_node.ts#L20)

Load upstream's own glob matcher.

## Returns

`Promise`<(`glob`: `string`) => `string`>

Upstream's `globToRegex`.

## Remarks

Deep-imported rather than ported, so this evaluator CANNOT drift from the profile SRT actually
generates — a hand-copied `globToRegex` would make parity a maintenance promise instead of a
property. The specifier is deliberately PACKAGE-RELATIVE and resolved through the optional peer,
matching `escape.ts`'s deep import of `quote()`: an absolute path would resolve only on the
machine that wrote it and would fail at runtime for every consumer of the published package.

The module is safe to reach into — `sandbox-utils.js` imports only `os`/`path`/`fs`, so this
cannot pull upstream's bundled zod into a repo that has never depended on it.
