MCPcopy Create free account
hub / github.com/bigskysoftware/_hyperscript / get

Method get

www/js/_hyperscript-max.js:1917–1942  ·  view source on GitHub ↗
(target, prop)

Source from the content-addressed store, hash-verified

1915 });
1916 }
1917 get(target, prop) {
1918 if (prop === "then") {
1919 return null;
1920 } else if (prop === "length") {
1921 return this.#parseCookies().length;
1922 } else if (prop === "clear") {
1923 return (name) => {
1924 document.cookie = name + "=;expires=Thu, 01 Jan 1970 00:00:00 GMT";
1925 };
1926 } else if (prop === "clearAll") {
1927 return () => {
1928 for (const cookie of this.#parseCookies()) {
1929 document.cookie = cookie.name + "=;expires=Thu, 01 Jan 1970 00:00:00 GMT";
1930 }
1931 };
1932 } else if (prop === Symbol.iterator) {
1933 var cookies2 = this.#parseCookies();
1934 return cookies2[Symbol.iterator].bind(cookies2);
1935 } else if (typeof prop === "string") {
1936 if (!isNaN(prop)) {
1937 return this.#parseCookies()[parseInt(prop)];
1938 }
1939 var match = this.#parseCookies().find((c) => c.name === prop);
1940 return match ? match.value : void 0;
1941 }
1942 }
1943 set(target, prop, value) {
1944 var parts = [];
1945 if (typeof value === "string") {

Callers 15

formatErrorsMethod · 0.45
getEventQueueForMethod · 0.45
getHyperTraceMethod · 0.45
registerHyperTraceMethod · 0.45
_getObjectStateMethod · 0.45
notifyGlobalSymbolMethod · 0.45
notifyElementSymbolMethod · 0.45
notifyPropertyMethod · 0.45
_handleDOMEventMethod · 0.45
_subscribeEffectMethod · 0.45
_unsubscribeEffectMethod · 0.45

Calls 2

#parseCookiesMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected