MCPcopy
hub / github.com/opentrace/opentrace / endpointId

Function endpointId

ui/src/components/graph/layoutHelpers.ts:52–59  ·  view source on GitHub ↗
(
  endpoint: string | number | GraphNode | undefined,
)

Source from the content-addressed store, hash-verified

50
51/** Extract string ID from a link endpoint (handles both string and object forms). */
52export function endpointId(
53 endpoint: string | number | GraphNode | undefined,
54): string {
55 if (typeof endpoint === 'string') return endpoint;
56 if (typeof endpoint === 'object' && endpoint !== null)
57 return (endpoint as GraphNode).id;
58 return String(endpoint);
59}
60
61// ─── Community Spacing ───────────────────────────────────────────────────
62// Pushes community clusters apart to prevent overlap. Runs synchronously

Callers 2

usePixiLayoutFunction · 0.90
useGraphInstanceFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected