MCPcopy Create free account
hub / github.com/Useful-Scripts-Extension/useful-script / getStorage

Function getStorage

scripts/chongLuaDao.js:150–154  ·  view source on GitHub ↗
(key, defaultValue = null)

Source from the content-addressed store, hash-verified

148};
149
150function getStorage(key, defaultValue = null) {
151 return chrome.storage.local
152 .get([key])
153 .then((data) => data?.[key] ?? defaultValue);
154}
155
156// ===================== bg script context =====================
157let cached = null;

Callers 2

saveBgCacheFunction · 0.85
analyzeWebFunction · 0.85

Calls 1

getMethod · 0.80

Tested by

no test coverage detected