Set of methods to operate eitri-app data storage
Notes:
Storage data is not shared between different eitri-apps. Data is transmitted as a string and handled with JSON encoding/decoding. Pay attention to the size of the data to avoid affecting the experience.
Clears all data created by the respective eitri-app from storage
Note:
This method does not clear other data saved by other eitri-apps
Example:
await Eitri.storage.clear() Copy
await Eitri.storage.clear()
Compatibility Control API LEVEL 1 - Functionality added
Compatibility Control
1
Gets a piece of data from eitri-app storage
const storedValue = await Eitri.storage.getItem('myData')const myValue = JSON.parse(storedValue) Copy
const storedValue = await Eitri.storage.getItem('myData')const myValue = JSON.parse(storedValue)
Registration key
Retrieves all registration keys stored by the respective eitri-app from storage
const myKeys = await Eitri.storage.keys() Copy
const myKeys = await Eitri.storage.keys()
Deletes a piece of data from eitri-app storage
await Eitri.storage.removeItem('myData') Copy
await Eitri.storage.removeItem('myData')
Saves a piece of data to eitri-app storage
await Eitri.storage.setItem('myData', JSON.stringify({myData: 'valueOfMyData'})) Copy
await Eitri.storage.setItem('myData', JSON.stringify({myData: 'valueOfMyData'}))
Key for registration
Value to be saved
Generated using TypeDoc
Set of methods to operate eitri-app data storage
Notes:
Storage data is not shared between different eitri-apps. Data is transmitted as a string and handled with JSON encoding/decoding. Pay attention to the size of the data to avoid affecting the experience.