Simple data persistence for your Electron app or module. Save and load user preferences, app state, cache, etc. Electron doesn't have a built-in way to persist user preferences and other data. This module handles that for you, so you can focus on building your app. You can use this module directly in both the main and renderer process. For use in the renderer process only, you need to call Store.initRenderer() in the main process, or create a new Store instance (new Store()) in the main process. Changes are written to disk atomically, so if the process crashes during a write, it will not corrupt the existing config. Under the hood, the JSON Schema validator ajv is used to validate your config. We use JSON Schema draft-07 and support all validation keywords and formats. You should define your schema as an object where each key is the name of your data's property and each value is a JSON schema used to validate that property.

Features

  • Changes are written to disk atomically
  • Electron doesn't have a built-in way to persist user preferences and other data
  • Simple data persistence for your Electron app or module
  • Save and load user preferences, app state, cache, etc.
  • Under the hood, the JSON Schema validator ajv is used to validate your config
  • The default value will be overwritten by the defaults option if set

Project Samples

Project Activity

See All Activity >

Categories

Frameworks

License

MIT License

Follow electron-store

electron-store Web Site

You Might Also Like
Our Free Plans just got better! | Auth0 by Okta Icon
Our Free Plans just got better! | Auth0 by Okta

With up to 25k MAUs and unlimited Okta connections, our Free Plan lets you focus on what you do best—building great apps.

You asked, we delivered! Auth0 is excited to expand our Free and Paid plans to include more options so you can focus on building, deploying, and scaling applications without having to worry about your secuirty. Auth0 now, thank yourself later.
Try free now
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of electron-store!

Additional Project Details

Operating Systems

Linux, Mac, Windows

Programming Language

JavaScript

Related Categories

JavaScript Frameworks

Registered

2022-09-23