MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / validateUuid

Function validateUuid

source code/utils/sessionStoragePortable.ts:28–31  ·  view source on GitHub ↗
(maybeUuid: unknown)

Source from the content-addressed store, hash-verified

26 /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i
27
28export function validateUuid(maybeUuid: unknown): UUID | null {
29 if (typeof maybeUuid !== 'string') return null
30 return uuidRegex.test(maybeUuid) ? (maybeUuid as UUID) : null
31}
32
33// ---------------------------------------------------------------------------
34// JSON string field extraction — no full parse, works on truncated lines

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected