MCPcopy Index your code
hub / github.com/callstack/agent-device / requireText

Function requireText

src/commands/text.ts:11–17  ·  view source on GitHub ↗
(value: string | undefined, field: string)

Source from the content-addressed store, hash-verified

9}
10
11export function requireText(value: string | undefined, field: string): string {
12 const text = value?.trim();
13 if (!text) {
14 throw new AppError('INVALID_ARGS', `${field} must be a non-empty string`);
15 }
16 return text;
17}

Callers 10

normalizeReadLogsOptionsFunction · 0.90
normalizePageOptionsFunction · 0.90
normalizeTimeWindowFunction · 0.90
normalizeStringListFunction · 0.90
getAppStateCommandFunction · 0.90
pushAppCommandFunction · 0.90
requireAppEventNameFunction · 0.90
runInstallCommandFunction · 0.90
normalizeInstallSourceFunction · 0.90
normalizeOptionalTextFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected