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

Function shared

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

Source from the content-addressed store, hash-verified

3861 const suffixes = [`${base}.lua`, `${base}.luau`, `${base}/init.lua`, `${base}/init.luau`];
3862 const byBasename = luaBasenameIndex(context);
3863 const shared = (a: string, b: string): number => {
3864 let i = 0;
3865 while (i < a.length && i < b.length && a[i] === b[i]) i++;
3866 return i;
3867 };
3868 for (const suffix of suffixes) {
3869 // Only files sharing the suffix's basename can match — the bucket is in
3870 // 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