🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.
TypeScript analyticsautogenevaluationlangchainlarge-language-modelsllama-indexllmllm-evaluationllm-observabilityllmopsmonitoringobservabilityopen-sourceopenaiplaygroundprompt-engineeringprompt-managementself-hostedycombinator
/** isApiKeyExpired reports whether an api key's expiry is at or before now; a null expiry never expires. */
export function isApiKeyExpired(
expiresAt: Date | string | null | undefined,
now: number = Date.now(),
): boolean {
if (!expiresAt) return false;
return new Date(expiresAt).getTime() <= now;
}