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

Function sorted

src/resolution/workspace-packages.ts:829–830  ·  view source on GitHub ↗
(map: Map<string, V> | undefined)

Source from the content-addressed store, hash-verified

827export function workspaceFingerprint(ws: WorkspacePackages | null): string {
828 if (!ws) return 'none';
829 const sorted = <V>(map: Map<string, V> | undefined): Array<[string, V]> =>
830 map ? [...map.entries()].sort(([a], [b]) => (a < b ? -1 : a > b ? 1 : 0)) : [];
831 const canonical = JSON.stringify({
832 byName: sorted(ws.byName),
833 entryByName: sorted(ws.entryByName),

Callers 2

workspaceFingerprintFunction · 0.70
mainFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected