MCPcopy Create free account
hub / github.com/hashintel/hash / getFromLocalStorage

Function getFromLocalStorage

apps/plugin-browser/src/shared/storage.ts:133–139  ·  view source on GitHub ↗
(
  key: Key,
)

Source from the content-addressed store, hash-verified

131 persistedUserSettingKeys.includes(key as PersistedUserSettingsKey);
132
133export const getFromLocalStorage = async <Key extends keyof LocalStorage>(
134 key: Key,
135): Promise<LocalStorage[Key] | undefined> => {
136 return browser.storage.local
137 .get(key)
138 .then((result) => result[key] as LocalStorage[Key]);
139};
140
141// Avoid spamming the db with updates if the user is editing settings quickly or writing a quick note
142const debouncedEntityUpdate = debounce(async () => {

Callers 10

getStorageValueFunction · 0.90
background.tsFile · 0.90
getApiOriginUrlFunction · 0.90
createWebSocketFunction · 0.90
inferEntitiesFunction · 0.90
clearErrorFunction · 0.90
getUserFunction · 0.90
queryGraphQlApiFunction · 0.90
storage.tsFile · 0.85

Calls 2

thenMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected