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

Function candidateCreatedAt

packages/core/sdk/src/oauth-service.ts:734–745  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

732 // epoch ms for deterministic oldest-first ordering; an unparseable/missing
733 // value sorts as 0 (oldest), so slug then breaks the tie stably.
734 const candidateCreatedAt = (value: unknown): number => {
735 if (value instanceof Date) {
736 const ms = value.getTime();
737 return Number.isFinite(ms) ? ms : 0;
738 }
739 if (typeof value === "number") return Number.isFinite(value) ? value : 0;
740 if (typeof value === "string") {
741 const ms = Date.parse(value);
742 return Number.isFinite(ms) ? ms : 0;
743 }
744 return 0;
745 };
746
747 const dcrCandidatesForIssuer = (
748 owner: Owner,

Callers 1

dcrCandidatesForIssuerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected