$.persistentStorage

Functions

clear

$.persistentStorage.clear(): void

When invoked, will empty all keys out of the storage.

getItem

$.persistentStorage.getItem(keyName: string): T | null

When passed a key name, will return that key's value.

Example

$.persistentStorage.getItem('settings.mainMenuMovie');

Parameter

NameTypeDescription
keyNamestringNo description provided.

See also

key

$.persistentStorage.key(n: number): string | null

When passed a number n, this method will return the name of the nth key in the storage.

Parameter

NameTypeDescription
nnumberNo description provided.

removeItem

$.persistentStorage.removeItem(keyName: string): void

When passed a key name, will remove that key from the storage.

Parameter

NameTypeDescription
keyNamestringNo description provided.

setItem

$.persistentStorage.setItem(keyName: string, keyValue: JsonValue): void

When passed a key name and value, will add that key to the storage, or update that key's value if it already exists.

Example

$.persistentStorage.setItem('dontShowAgain.' + key, true);

Parameters

NameTypeDescription
keyNamestringNo description provided.
keyValueJsonValue No description provided.

See also

Variables

NameTypeDescription
lengthint32 Returns an integer representing the number of data items stored in the Storage object.