MCPcopy Create free account
hub / github.com/compiler-explorer/compiler-explorer / get

Method get

static/local.ts:38–45  ·  view source on GitHub ↗
(key: string, ifNotPresent: T)

Source from the content-addressed store, hash-verified

36
37class LocalOnlyStorage implements Storage {
38 get<T>(key: string, ifNotPresent: T): string | T {
39 try {
40 return window.localStorage.getItem(prefix + key) ?? ifNotPresent;
41 } catch {
42 // Swallow up any security exceptions...
43 return ifNotPresent;
44 }
45 }
46
47 remove(key: string) {
48 try {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected