MCPcopy Create free account
hub / github.com/PaperDebugger/paperdebugger / get

Method get

webapp/_webapp/src/libs/storage.ts:62–72  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

60 ) {}
61
62 get(): T {
63 const raw = this.adapter.getItem(this.key);
64 if (raw === null) {
65 return this.defaultValue;
66 }
67 try {
68 return JSON.parse(raw) as T;
69 } catch {
70 return this.defaultValue;
71 }
72 }
73
74 set(value: T): void {
75 this.adapter.setItem(this.key, JSON.stringify(value));

Callers

nothing calls this directly

Calls 1

getItemMethod · 0.65

Tested by

no test coverage detected