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

Function asNumber

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

Source from the content-addressed store, hash-verified

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;
79
80/** Pull `user.email` out of a token response (WorkOS returns the user inline). */
81const 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