MCPcopy Create free account
hub / github.com/callstack/agent-device / isExpired

Function isExpired

src/cli/auth-session.ts:566–571  ·  view source on GitHub ↗
(expiresAt: string | undefined, now: (() => number) | undefined)

Source from the content-addressed store, hash-verified

564}
565
566function isExpired(expiresAt: string | undefined, now: (() => number) | undefined): boolean {
567 if (!expiresAt) return false;
568 const timestamp = Date.parse(expiresAt);
569 if (!Number.isFinite(timestamp)) return true;
570 return timestamp <= (now?.() ?? Date.now());
571}
572
573function hasToken(value: unknown): value is string {
574 return typeof value === 'string' && value.trim().length > 0;

Callers 2

summarizeCliSessionFunction · 0.85
resolveCliSessionAccessFunction · 0.85

Calls 3

nowFunction · 0.85
isFiniteMethod · 0.80
parseMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…