MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / asString

Function asString

apps/cli/src/device-login.ts:74–75  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

72const cliLoginUrl = (origin: string): string => `${origin.replace(/\/+$/, "")}/api/auth/cli-login`;
73
74const asString = (value: unknown): string | undefined =>
75 typeof value === "string" && value.length > 0 ? value : undefined;
76
77const asNumber = (value: unknown): number | undefined =>
78 typeof value === "number" && Number.isFinite(value) ? value : undefined;

Callers 5

readUserEmailFunction · 0.85
discoverCliLoginFunction · 0.85
requestDeviceCodeFunction · 0.85
pollForDeviceTokensFunction · 0.85
refreshDeviceTokensFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected