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

Function sorted

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

Source from the content-addressed store, hash-verified

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

Callers 2

workspaceFingerprintFunction · 0.70
mainFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected