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

Function requireString

packages/computer-use/src/maka-cu-protocol.ts:561–566  ·  view source on GitHub ↗
(method: string, value: unknown, what: string)

Source from the content-addressed store, hash-verified

559}
560
561function requireString(method: string, value: unknown, what: string): string {
562 if (typeof value !== 'string' || value.length === 0) {
563 throw new MakaCuProtocolViolation(method, `${what} is not a non-empty string`);
564 }
565 return value;
566}
567
568function requireNumber(method: string, value: unknown, what: string): number {
569 if (typeof value !== 'number' || !Number.isFinite(value)) {

Callers 9

readEnvelopeFunction · 0.70
readElementFunction · 0.70
readImageFieldFunction · 0.70
readWindowFunction · 0.70
readAppFunction · 0.70
readLaunchedAppFunction · 0.70
readSnapshotFunction · 0.70
readDifferenceFunction · 0.70
readDispatchResultFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected