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

Function tier

src/resolution/workspace-packages.ts:225–225  ·  view source on GitHub ↗
(key: string)

Source from the content-addressed store, hash-verified

223 if (!value || typeof value !== 'object') return [];
224 const conditions = Object.entries(value as Record<string, unknown>);
225 const tier = (key: string): number => (RESOLVING_CONDITIONS.has(key) ? 0 : TYPE_CONDITIONS.has(key) ? 2 : 1);
226 return [0, 1, 2].flatMap((t) => conditions.filter(([key]) => tier(key) === t).flatMap(([, v]) => exportTargets(v)));
227}
228

Callers 1

exportTargetsFunction · 0.70

Calls 1

hasMethod · 0.80

Tested by

no test coverage detected