This repository has been archived by the owner on Jul 4, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 38
PrefHandler
dangered wolf edited this page Mar 27, 2022
·
2 revisions
ModernDeck includes functions to help deal with the storage of simple key/value preferences.
It abstracts platform differences this way and provides a simple interface.
For example, while the browser extensions rely on localStorage
, the Electron app relies on an electron-store
called "mtdsettings"
.
Returns the saved preference with the specified key. If the preference has not been set before, it will return undefined
.
Sets the preference with the key key
to value
.
Valid types for preference values can be String
, number
, boolean
, or undefined
to clear it.
Returns boolean; true
if the preference storage system has a value for the key key
, or false
if it does not.
Clears all ModernDeck preferences, while leaving Twitter login intact.