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

Function shared

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

Source from the content-addressed store, hash-verified

1677 const suffixes = [`${base}.lua`, `${base}.luau`, `${base}/init.lua`, `${base}/init.luau`];
1678 const byBasename = luaBasenameIndex(context);
1679 const shared = (a: string, b: string): number => {
1680 let i = 0;
1681 while (i < a.length && i < b.length && a[i] === b[i]) i++;
1682 return i;
1683 };
1684 for (const suffix of suffixes) {
1685 // Only files sharing the suffix's basename can match — the bucket is in
1686 // getAllFiles() order, so this filter yields exactly what the full-list

Callers 1

resolveLuaRequireFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected