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

Function candidateCreatedAt

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

Source from the content-addressed store, hash-verified

720 // epoch ms for deterministic oldest-first ordering; an unparseable/missing
721 // value sorts as 0 (oldest), so slug then breaks the tie stably.
722 const candidateCreatedAt = (value: unknown): number => {
723 if (value instanceof Date) {
724 const ms = value.getTime();
725 return Number.isFinite(ms) ? ms : 0;
726 }
727 if (typeof value === "number") return Number.isFinite(value) ? value : 0;
728 if (typeof value === "string") {
729 const ms = Date.parse(value);
730 return Number.isFinite(ms) ? ms : 0;
731 }
732 return 0;
733 };
734
735 const dcrCandidatesForIssuer = (
736 owner: Owner,

Callers 1

dcrCandidatesForIssuerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected