tiny-preferences
v1.1.0
Published
Atomically save a small JSON preferences file
Downloads
50
Readme
tiny-preferences
Atomically save a small JSON preferences file
API
prefs = new TinyPreferences(filename)
Make a new instance, data is stored as a JSON file in filename
value = await prefs.get(key)
Get a value
await prefs.set(key, value)
Set a value
await prefs.delete(key)
Delete a key
await prefs.flush()
Flush all pending state, automatically called in set/delete for you
License
Apache-2.0