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

Function shared

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

Source from the content-addressed store, hash-verified

4062 const suffixes = [`${base}.lua`, `${base}.luau`, `${base}/init.lua`, `${base}/init.luau`];
4063 const byBasename = luaBasenameIndex(context);
4064 const shared = (a: string, b: string): number => {
4065 let i = 0;
4066 while (i < a.length && i < b.length && a[i] === b[i]) i++;
4067 return i;
4068 };
4069 for (const suffix of suffixes) {
4070 // Only files sharing the suffix's basename can match — the bucket is in
4071 // getAllFiles() order, so this filter yields exactly what the full-list

Callers 1

resolveLuaRequireFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected