MCPcopy Index your code
hub / github.com/simstudioai/sim / byNameThenId

Function byNameThenId

apps/sim/lib/copilot/chat/workspace-context.ts:104–106  ·  view source on GitHub ↗

Stable order by display name, tie-broken by id, for inventory listings.

(a: { name: string; id: string }, b: { name: string; id: string })

Source from the content-addressed store, hash-verified

102
103/** Stable order by display name, tie-broken by id, for inventory listings. */
104function byNameThenId(a: { name: string; id: string }, b: { name: string; id: string }): number {
105 return stableCompare(a.name, b.name) || stableCompare(a.id, b.id)
106}
107
108/**
109 * Pure formatting: build WORKSPACE.md content from pre-fetched data.

Callers

nothing calls this directly

Calls 1

stableCompareFunction · 0.85

Tested by

no test coverage detected