npm stats
  • Search
  • About
  • Repo
  • Sponsor
  • more
    • Search
    • About
    • Repo
    • Sponsor

Made by Antonio Ramirez

tiny-preferences

1.1.1

@andrewosh

npmHomeRepoSnykSocket
Downloads:137
$ npm install tiny-preferences
DailyWeeklyMonthlyYearly

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