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

Function sorted

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

Source from the content-addressed store, hash-verified

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

Callers 2

workspaceFingerprintFunction · 0.70
mainFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected