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

Function requireEntityId

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

Source from the content-addressed store, hash-verified

60}
61
62export function requireEntityId(value: unknown, label: string): string {
63 const id = requireId(value, label);
64 if (!/^[A-Za-z0-9_-]{1,128}$/.test(id)) throw invalidProtocolFrame(`Invalid ${label}`);
65 return id;
66}
67
68export function requireCount(value: unknown, label: string): number {
69 if (!Number.isSafeInteger(value) || (value as number) < 0) {

Callers 15

decodeTurnStartInputFunction · 0.85
decodeMessageContentFunction · 0.85
decodeTurnQueryInputFunction · 0.85
decodeTurnStopInputFunction · 0.85
decodeTurnResumePlanFunction · 0.85
decodeTurnSnapshotFunction · 0.85

Calls 3

invalidProtocolFrameFunction · 0.85
requireIdFunction · 0.70
testMethod · 0.65

Tested by

no test coverage detected