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

Other Useful Business Software
Gemini 3 and 200+ AI Models on One Platform Icon
Gemini 3 and 200+ AI Models on One Platform

Access Google's best plus Claude, Llama, and Gemma. Fine-tune and deploy from one console.

Build generative AI apps with Vertex AI. Switch between models without switching platforms.
Start Free
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