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

Function parseCookie

apps/cloud/src/auth/cookies.ts:4–12  ·  view source on GitHub ↗
(cookieHeader: string | null, name: string)

Source from the content-addressed store, hash-verified

2// SSR auth gate all need it). Pure string code — safe in any bundle.
3
4export const parseCookie = (cookieHeader: string | null, name: string): string | null => {
5 if (!cookieHeader) return null;
6 const match = cookieHeader
7 .split(";")
8 .map((c) => c.trim())
9 .find((c) => c.startsWith(`${name}=`));
10 if (!match) return null;
11 return match.slice(name.length + 1) || null;
12};

Callers 5

start.tsFile · 0.90
resolveAuthHintFunction · 0.90
ssr-gate.tsFile · 0.90
workos.tsFile · 0.90
marketing.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected