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

Function asNumber

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

Source from the content-addressed store, hash-verified

66 typeof value === "string" && value.length > 0 ? value : undefined;
67
68const asNumber = (value: unknown): number | undefined =>
69 typeof value === "number" && Number.isFinite(value) ? value : undefined;
70
71/** Pull `user.email` out of a token response (WorkOS returns the user inline). */
72const readUserEmail = (body: Record<string, unknown>): string | undefined => {

Callers 4

accessTokenExpiryFunction · 0.85
requestDeviceCodeFunction · 0.85
pollForDeviceTokensFunction · 0.85
refreshDeviceTokensFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected