getFromStorage function infrastructure exported ✓ 100.0%
Last updated: 2026-03-05T10:53:28.866Z
Location
Metrics
LOC: 7
Complexity: 2
Params: 3
Coverage: 100.0% (2/2 lines, 0x executed)
Signature
getFromStorage(
key: string,
defaultValue: T,
): : Promise<T>
Summary
Reads a value from chrome.storage.local.
Tags
#@param key - Storage key to retrieve#@param defaultValue - Value returned when the key does not exist#@returns The stored value or `defaultValue`
Source Code
export async function getFromStorage<T>(
key: string,
defaultValue: T,
): Promise<T> {
const result = await chrome.storage.local.get(key);
return (result[key] as T) ?? defaultValue;
}
Dependencies (Outgoing)
| Target | Type |
|---|---|
| key | dynamic_call |
Impact (Incoming)
| Source | Type |
|---|---|
| getDemoFlows | uses |
| getFieldDetectionCache | calls |
| getSavedForms | calls |
| getIgnoredFields | calls |
| getRules | calls |
| getSettings | calls |