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
$300 Free Credits for Your Google Cloud Projects Icon
$300 Free Credits for Your Google Cloud Projects

Start building on Google Cloud with $300 in free credits. No commitment, no credit card required until you're ready to scale.

Launch your next project with $300 in free Google Cloud credits—no strings attached. Test, build, and deploy without risk. Use your credits across the entire Google Cloud platform to find what works best for your needs. After your credits are used, continue with always-free tier services. Only pay when you're ready to scale. Sign up in minutes and start exploring.
Start Free Trial
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