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

Function tier

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

Source from the content-addressed store, hash-verified

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

Callers 1

exportTargetsFunction · 0.70

Calls 1

hasMethod · 0.80

Tested by

no test coverage detected