MCPcopy Create free account
hub / github.com/apache/maka / requireCount

Function requireCount

packages/runtime-host/src/protocol/codec.ts:68–73  ·  view source on GitHub ↗
(value: unknown, label: string)

Source from the content-addressed store, hash-verified

66}
67
68export function requireCount(value: unknown, label: string): number {
69 if (!Number.isSafeInteger(value) || (value as number) < 0) {
70 throw invalidProtocolFrame(`Invalid ${label}`);
71 }
72 return value as number;
73}
74
75export function requireUtf8String(value: unknown, label: string, maxBytes: number): string {
76 if (

Callers 15

requirePositiveCountFunction · 0.85
decodeTurnProviderRetryFunction · 0.85
positiveCountFunction · 0.85
decodeSubscriptionFrameFunction · 0.85
decodeAssistantDeltaFunction · 0.85
decodeSessionToolEventFunction · 0.85
requirePositiveCountFunction · 0.85

Calls 1

invalidProtocolFrameFunction · 0.85

Tested by

no test coverage detected