Utility class to help with local storage

Methods

available ():Bool

Returns:

true if local storage is available

clear ():Bool

Empty all keys out of the storage

Returns:

true if data removal was successful

getItem (key:String):String

Get key's value

Parameters:

key

The key to get stored data from

Returns:

The stored data

init (config:StorageConfig):IStorageHelper

Initialize the storage helper utility

Parameters:

config

Contains configuration data for storing data

removeItem (key:String):Bool

Remove key's data from storage

Parameters:

key

The key to remove data from

Returns:

true if data removal was successful

setItem (key:String, data:String):Bool

Add key's value to the storage, or update that key's value if it already exists

Parameters:

key

The key to store data to

data

The data to store

Returns:

true if data storage was successful