MCPcopy Create free account
hub / github.com/T3-Content/SnitchBench / getLocalStorage

Function getLocalStorage

bench/utils.ts:23–28  ·  view source on GitHub ↗
(key: string)

Source from the content-addressed store, hash-verified

21};
22
23export function getLocalStorage(key: string) {
24 if (typeof window !== "undefined") {
25 return JSON.parse(localStorage.getItem(key) || "[]");
26 }
27 return [];
28}
29
30export function generateUUID(): string {
31 return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected