MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / glob

Function glob

telemetry-dashboard/scripts/render-check.mjs:60–70  ·  view source on GitHub ↗

Expands one `*` in a path segment, newest match first.

(pattern)

Source from the content-addressed store, hash-verified

58
59/** Expands one `*` in a path segment, newest match first. */
60function glob(pattern) {
61 const [head, ...rest] = pattern.split('*');
62 const base = dirname(head);
63 const prefix = head.slice(base.length + 1);
64 if (!existsSync(base)) return [];
65 return readdirSync(base)
66 .filter((name) => name.startsWith(prefix))
67 .sort()
68 .reverse()
69 .map((name) => join(base, name) + rest.join('*'));
70}
71
72function findBrowser() {
73 const home = process.env.HOME ?? '';

Callers 1

findBrowserFunction · 0.85

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected