Retrieves a boolean from storage. The default implementation gets the value as string and checks if it equals '1'
Key to get value for
Default value to use
stored value is '1' or aDefault if there is no item
Retrieves a integer from storage. The default implementation gets the value as string and uses parseInt to convert it back to an integer.
Key to get integer for
Default value to use
parsed integer or aDefault if there is no item or parsing resulted in a NaN value.
Retrieves a number from storage. The default implementation gets the value as string and uses parseFloat to convert it back to a number.
Key to get value for
Default value to use
parsed number or aDefault if there is no item or parsing resulted in a NaN value.
Retrieves an object from storage. The default implementation gets a string using getString and uses JSON.parse to convert a string back to an object.
Key to retrieve object for
Default value to use
parsed object or aDefault if there is no item or an exception occurred while parsing the string.
Stores a boolean in the storage. The default implementation stores either '1' or '0'.
Key to store boolean for
Boolean to store
Stores an integer in the storage. The default implementation converts the value to a string and stores it as a string.
Key to store integer for
Integer to store
Stores a number in the storage. The default implementation converts the value to a string and stores it as a string.
Key to store number for
number to store
Extends
UFKeyedStorage
using localStorage to store values.