Alpha
Get the current user preferences.
If a key is supplied, the value stored under that key is returned. If no key is supplied, an object with all preferences is returned instead.
Optional
key: stringSupply the key for a specific preference to get only that value.
Set or delete the value for a specific user preference.
The value set must be serializable as JSON. If non-serializable data is given, it might result in an error, but more likely, the data will simply be lost.
a promise that will be resolved when the data has been saved
The key to store the value under.
Optional
data: TThe data to save. Leave undefined to instead delete the currently stored value.
Handle fetching and saving user preferences.