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

Method #parseCookies

www/js/_hyperscript.js:1911–1917  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 1

getMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected