UNPKG

@fluvial/cookies

Version:

A cookie management library for Fluvial

12 lines 354 B
export function parse(cookieHeader) { const segments = cookieHeader.split(";"); const items = {}; for (const segment of segments) { const [name, value] = segment.split("=").map(s => s.trim()); if (name && value) { items[name] = { name, value }; } } return items; } //# sourceMappingURL=parse.js.map