MCPcopy Create free account
hub / github.com/adcontextprotocol/adcp / parseNumericId

Function parseNumericId

server/src/routes/addie-admin.ts:78–81  ·  view source on GitHub ↗

* Helper to parse and validate a numeric ID parameter

(id: string)

Source from the content-addressed store, hash-verified

76 * Helper to parse and validate a numeric ID parameter
77 */
78function parseNumericId(id: string): number | null {
79 const parsed = parseInt(id, 10);
80 return isNaN(parsed) || parsed <= 0 ? null : parsed;
81}
82
83/**
84 * Extract a stable label for who triggered an admin-triage decision. Prefers

Callers 1

createAddieAdminRouterFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected