MCPcopy
hub / github.com/colbymchenry/codegraph / shared

Function shared

src/resolution/import-resolver.ts:1435–1439  ·  view source on GitHub ↗
(a: string, b: string)

Source from the content-addressed store, hash-verified

1433 const suffixes = [`${base}.lua`, `${base}.luau`, `${base}/init.lua`, `${base}/init.luau`];
1434 const files = context.getAllFiles();
1435 const shared = (a: string, b: string): number => {
1436 let i = 0;
1437 while (i < a.length && i < b.length && a[i] === b[i]) i++;
1438 return i;
1439 };
1440 for (const suffix of suffixes) {
1441 const matches = files.filter((f) => f === suffix || f.endsWith('/' + suffix));
1442 if (matches.length === 0) continue;

Callers 1

resolveLuaRequireFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected