MCPcopy
hub / github.com/plotly/dash / get

Method get

components/dash-table/src/core/storage/Cookie.ts:35–59  ·  view source on GitHub ↗
(id: string)

Source from the content-addressed store, hash-verified

33 }
34
35 public static get(id: string) {
36 if (!id.length) {
37 return;
38 }
39
40 if (!CookieStorage.enabled()) {
41 return;
42 }
43
44 id = id.toLowerCase();
45
46 const cookies = document.cookie.split(';').map(cookie => {
47 const fragments = cookie.split('=');
48
49 return {
50 id: fragments[0].trim(),
51 value: fragments[1]
52 };
53 });
54
55 return (
56 cookies.find(cookie => id === cookie.id.toLocaleLowerCase()) ||
57 ({} as any)
58 ).value;
59 }
60
61 public static set(id: string, value: string, domain = '', path = '/') {
62 if (!CookieStorage.enabled()) {

Callers 6

getCacheFunction · 0.45
getFunction · 0.45
getFunction · 0.45
setMethod · 0.45
debugLevelMethod · 0.45
logLevelMethod · 0.45

Calls 2

findMethod · 0.80
trimMethod · 0.45

Tested by

no test coverage detected