IWindowStorage interface
Methods
contains |
Returns true or false if the given key is present in the cache. |
get |
Get the item from the window storage object matching the given key. |
get |
Get all the keys from the window storage object as an iterable array of strings. |
get |
Getter for sensitive data that may contain PII. |
initialize(string) | Async initializer |
remove |
Removes the item in the window storage object matching the given key. |
set |
Sets the item in the window storage object with the given key. |
set |
Setter for sensitive data that may contain PII. |
Method Details
containsKey(string)
Returns true or false if the given key is present in the cache.
function containsKey(key: string): boolean
Parameters
- key
-
string
Returns
boolean
getItem(string)
Get the item from the window storage object matching the given key.
function getItem(key: string): null | T
Parameters
- key
-
string
Returns
null | T
getKeys()
Get all the keys from the window storage object as an iterable array of strings.
function getKeys(): string[]
Returns
string[]
getUserData(string)
Getter for sensitive data that may contain PII.
function getUserData(key: string): null | T
Parameters
- key
-
string
Returns
null | T
initialize(string)
Async initializer
function initialize(correlationId: string): Promise<void>
Parameters
- correlationId
-
string
Returns
Promise<void>
removeItem(string)
Removes the item in the window storage object matching the given key.
function removeItem(key: string)
Parameters
- key
-
string
setItem(string, T)
Sets the item in the window storage object with the given key.
function setItem(key: string, value: T)
Parameters
- key
-
string
- value
-
T
setUserData(string, T, string, string)
Setter for sensitive data that may contain PII.
function setUserData(key: string, value: T, correlationId: string, timestamp: string): Promise<void>
Parameters
- key
-
string
- value
-
T
- correlationId
-
string
- timestamp
-
string
Returns
Promise<void>