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
MongoDB Atlas runs apps anywhere Icon
MongoDB Atlas runs apps anywhere

Deploy in 115+ regions with the modern database for every enterprise.

MongoDB Atlas gives you the freedom to build and run modern applications anywhere—across AWS, Azure, and Google Cloud. With global availability in over 115 regions, Atlas lets you deploy close to your users, meet compliance needs, and scale with confidence across any geography.
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