MCPcopy Create free account
hub / github.com/bigskysoftware/_hyperscript / #parseCookies

Method #parseCookies

www/js/_hyperscript.esm.js:1909–1915  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1907// src/core/runtime/cookies.js
1908var CookieJar = class {
1909 #parseCookies() {
1910 if (!document.cookie) return [];
1911 return document.cookie.split("; ").map((entry) => {
1912 var eq = entry.indexOf("=");
1913 return { name: entry.slice(0, eq), value: decodeURIComponent(entry.slice(eq + 1)) };
1914 });
1915 }
1916 get(target, prop) {
1917 if (prop === "then") {
1918 return null;

Callers 1

getMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected