Class DataStorage
Hierarchy
- DataStorage
Index
Constructors
Methods
Constructors
constructor
Returns DataStorage
Methods
Static Read BooleanSearch playground for ReadBoolean
Reads a boolean from the data storage
Parameters
key: string
The key to read
defaultValue: boolean
The value if the key doesn't exist
Returns boolean
The boolean value
Static Read NumberSearch playground for ReadNumber
Reads a number from the data storage
Parameters
key: string
The key to read
defaultValue: number
The value if the key doesn't exist
Returns number
The number value
Static Read StringSearch playground for ReadString
Reads a string from the data storage
Parameters
key: string
The key to read
defaultValue: string
The value if the key doesn't exist
Returns string
The string value
Static Write BooleanSearch playground for WriteBoolean
Writes a boolean to the data storage
Parameters
key: string
The key to write
value: boolean
The value to write
Returns void
Static Write NumberSearch playground for WriteNumber
Writes a number to the data storage
Parameters
key: string
The key to write
value: number
The value to write
Returns void
Static Write StringSearch playground for WriteString
Writes a string to the data storage
Parameters
key: string
The key to write
value: string
The value to write
Returns void
Class for storing data to local storage if available or in-memory storage otherwise