Skip to content

Commit

Permalink
Meta tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed May 7, 2023
1 parent 166cd4b commit d120209
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 38 deletions.
2 changes: 1 addition & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ declare namespace ElectronStore {
}

/**
Simple data persistence for your [Electron](https://electronjs.org) app or module - Save and load user preferences, app state, cache, etc.
Simple data persistence for your [Electron](https://electronjs.org) app or module - Save and load user settings, app state, cache, etc.
*/
declare class ElectronStore<T extends Record<string, any> = Record<string, unknown>> extends Conf<T> {
/**
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "electron-store",
"version": "8.1.0",
"description": "Simple data persistence for your Electron app or module - Save and load user preferences, app state, cache, etc",
"description": "Simple data persistence for your Electron app or module - Save and load user settings, app state, cache, etc",
"license": "MIT",
"repository": "sindresorhus/electron-store",
"funding": "https://github.com/sponsors/sindresorhus",
Expand Down
42 changes: 6 additions & 36 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,47 +1,15 @@
# electron-store

> Simple data persistence for your [Electron](https://electronjs.org) app or module - Save and load user preferences, app state, cache, etc
> Simple data persistence for your [Electron](https://electronjs.org) app or module - Save and load user settings, 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. The data is saved in a JSON file named config.json in [`app.getPath('userData')`](https://electronjs.org/docs/api/app#appgetpathname).
Electron doesn't have a built-in way to persist user settings and other data. This module handles that for you, so you can focus on building your app. The data is saved in a JSON file named config.json in [`app.getPath('userData')`](https://electronjs.org/docs/api/app#appgetpathname).

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.

<br>

---

<div align="center">
<p>
<p>
<sup>
<a href="https://github.com/sponsors/sindresorhus">My open source work is supported by the community</a>
</sup>
</p>
<sup>Special thanks to:</sup>
<br>
<br>
<a href="https://standardresume.co/tech">
<img src="https://sindresorhus.com/assets/thanks/standard-resume-logo.svg" width="200"/>
</a>
</p>
<br>
<a href="https://keygen.sh">
<div>
<img src="https://sindresorhus.com/assets/thanks/keygen-logo.svg" width="210" alt="Keygen">
</div>
<b>A dead-simple software licensing and distribution API built for developers</b>
</a>
<br>
</div>

---

<br>

## Install

```
$ npm install electron-store
```sh
npm install electron-store
```

*Requires Electron 11 or later.*
Expand Down Expand Up @@ -130,6 +98,8 @@ store.set('foo', '1');

Type: `object`

**Important: I cannot provide support for this feature. It has some known bugs. I have no plans to work on it, but pull requests are welcome.**

You can use migrations to perform operations to the store whenever a version is upgraded.

The `migrations` object should consist of a key-value pair of `'version': handler`. The `version` can also be a [semver range](https://github.com/npm/node-semver#ranges).
Expand Down

0 comments on commit d120209

Please sign in to comment.