LocalStorage
Constructors
new LocalStorage()
new LocalStorage():
LocalStorage
Returns
Accessors
debug
set
debug(pValue
):void
Parameters
• pValue: boolean
Source
hasUserData
get
hasUserData():boolean
Returns
boolean
Source
Methods
deleteAllData()
deleteAllData():
void
Deletes all data saved in local storage
Returns
void
Source
deleteItem()
deleteItem(
pID
):boolean
Deletes an item
Parameters
• pID: string
The ID of the item to delete
Returns
boolean
Source
printAll()
printAll():
void
Prints all values stored in local storage
Returns
void
Source
readBool()
readBool(
pID
,pDefault
):boolean
Reads a Bool
Parameters
• pID: string
The ID to read the bool
• pDefault: boolean
= false
The default value of the returned bool
Returns
boolean
Source
readNumber()
readNumber(
pID
,pDefault
):number
Reads a Number
Parameters
• pID: string
The ID to read the number
• pDefault: number
= 0
The default value of the returned number
Returns
number
Source
readString()
readString(
pID
,pDefault
):string
Reads a String
Parameters
• pID: string
The ID to read the string
• pDefault: string
= ''
The default value of the returned string
Returns
string
Source
storeBool()
storeBool(
pID
,pValue
):void
Stores a Bool
Parameters
• pID: string
The ID to store the bool
• pValue: boolean
The stored bool value
Returns
void
Source
storeNumber()
storeNumber(
pID
,pValue
):void
Stores a Number
Parameters
• pID: string
The ID to store the number
• pValue: number
The stored number value
Returns
void
Source
storeString()
storeString(
pID
,pValue
):void
Stores a String
Parameters
• pID: string
The ID to store the string
• pValue: string
The stored string value
Returns
void