MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / integer

Function integer

graph-ui/src/architecture/route-graph-source.ts:41–45  ·  view source on GitHub ↗
(value: string | undefined)

Source from the content-addressed store, hash-verified

39
40const clean = (value: string | undefined) => value && value !== '{}' && value !== '-' ? value : undefined;
41function integer(value: string | undefined): number | undefined {
42 if (!value?.trim()) return undefined;
43 const result = Number(value);
44 return Number.isSafeInteger(result) && result >= 0 ? result : undefined;
45}
46function endpoint(row: Record<string, string>, side: 'source' | 'target', label: string): GraphNode | undefined {
47 const id = integer(row[side]);
48 if (id === undefined) return undefined;

Callers 2

endpointFunction · 0.70
loadRouteGraphFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected