MCPcopy
hub / github.com/thedaviddelta/lingva-translate / localGetItem

Function localGetItem

utils/storage.ts:3–9  ·  view source on GitHub ↗
(key: string)

Source from the content-addressed store, hash-verified

1// LocalStorage throws an error if all browser cookies are disabled
2
3export function localGetItem(key: string) {
4 try {
5 return localStorage.getItem(key);
6 } catch (e) {
7 return null;
8 }
9}
10
11export function localSetItem(key: string, value: string) {
12 try {

Callers 2

initLocalStorageFunction · 0.90
PageFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected