CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
sagemathinc

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: sagemathinc/cocalc
Path: blob/master/src/packages/sync-client/lib/cookies.ts
Views: 687
1
import * as cookie from "cookie";
2
3
export function toCookieHeader(obj: object): string {
4
const pairs: string[] = [];
5
6
for (const key in obj) {
7
pairs.push(cookie.serialize(key, obj[key]));
8
}
9
10
return pairs.join("; ");
11
}
12
13