getItem
Returns the value of an item by the specified key.
Parameters
-
key:
string
The key of the item whose value needs to be retrieved. -
defaultValue:
UgcFormStorageAvailableValueType
(optional)
The default value that will be returned if the item with the specified key is not found.
Return Value
The method returns a Promise<UgcFormStorageAvailableValueType>
, which resolves to the value associated with the specified key. If the item is not found, the defaultValue
is returned.
Example Usage
const value = await getItem('session_key', 'default_value')