MCPcopy Index your code
hub / github.com/anomalyco/opencode / normalizeReferralCode

Function normalizeReferralCode

packages/console/app/src/lib/referral-invite.ts:8–10  ·  view source on GitHub ↗
(code?: string | null)

Source from the content-addressed store, hash-verified

6const REFERRAL_MAX_AGE = 60 * 60 * 24 * 30
7
8export function normalizeReferralCode(code?: string | null) {
9 return Referral.normalizeCode(code)
10}
11
12export function referralCookie(code: string) {
13 return `${REFERRAL_COOKIE}=${encodeURIComponent(code)}; Path=/; Max-Age=${REFERRAL_MAX_AGE}; SameSite=Lax; HttpOnly`

Callers 2

onRequestFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected