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

Method get

tools/common/_hyperscript.iife.js:1905–1930  ·  view source on GitHub ↗
(target, prop)

Source from the content-addressed store, hash-verified

1903 });
1904 }
1905 get(target, prop) {
1906 if (prop === "then") {
1907 return null;
1908 } else if (prop === "length") {
1909 return this.#parseCookies().length;
1910 } else if (prop === "clear") {
1911 return (name) => {
1912 document.cookie = name + "=;expires=Thu, 01 Jan 1970 00:00:00 GMT";
1913 };
1914 } else if (prop === "clearAll") {
1915 return () => {
1916 for (const cookie of this.#parseCookies()) {
1917 document.cookie = cookie.name + "=;expires=Thu, 01 Jan 1970 00:00:00 GMT";
1918 }
1919 };
1920 } else if (prop === Symbol.iterator) {
1921 var cookies2 = this.#parseCookies();
1922 return cookies2[Symbol.iterator].bind(cookies2);
1923 } else if (typeof prop === "string") {
1924 if (!isNaN(prop)) {
1925 return this.#parseCookies()[parseInt(prop)];
1926 }
1927 var match = this.#parseCookies().find((c) => c.name === prop);
1928 return match ? match.value : void 0;
1929 }
1930 }
1931 set(target, prop, value) {
1932 var parts = [];
1933 if (typeof value === "string") {

Callers 15

server.jsFile · 0.45
formatErrorsMethod · 0.45
getEventQueueForMethod · 0.45
getHyperTraceMethod · 0.45
registerHyperTraceMethod · 0.45
_getObjectStateMethod · 0.45
notifyGlobalSymbolMethod · 0.45
notifyElementSymbolMethod · 0.45
notifyPropertyMethod · 0.45
_subscribeEffectMethod · 0.45
_unsubscribeEffectMethod · 0.45
_morphChildrenFunction · 0.45

Calls 2

#parseCookiesMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected