getParsedStorageItem()
getParsedStorageItem<
ReturnType>(key,area?):ReturnType|undefined
Defined in: utils/getParsedStorageItem.ts:11
Internal function for safely retrieving and parsing data from localStorage or sessionStorage.
Type Parameters
ReturnType
ReturnType
Parameters
key
string
The storage key
area?
"localStorage" | "sessionStorage" = 'localStorage'
The storage to read: localStorage (default) or sessionStorage
Returns
ReturnType | undefined
The parsed value or undefined if data is not found/invalid, in an SSR context, or when the browser refuses the storage
Last updated on