https://github.com/jawadalik91/electron-store
https://github.com/jawadalik91/electron-store
electron electron-app electron-react electron-reactjs electronjs javascript
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/jawadalik91/electron-store
- Owner: jawadalik91
- Created: 2018-10-12T10:29:33.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-10-12T14:37:33.000Z (over 7 years ago)
- Last Synced: 2025-12-13T15:10:23.013Z (6 months ago)
- Topics: electron, electron-app, electron-react, electron-reactjs, electronjs, javascript
- Language: JavaScript
- Size: 8.79 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# electron-store
Data storage module for app preferences.
## Getting Started
Most Electron apps need some sort of way to save user data. This could be user preferences (e.g. show/don’t show notifications) or some kind of application data (e.g. last window size and position). So how do we save user settings in an Electron app? And where do we save them to?
### Prerequisites
fs, path and electron only
```
const electron = require('electron');
const path = require('path');
const fs = require('fs');
```
### Installing
```
npm install --save @jawadalik91/electron-store
```
and you are done.
## Working Example
```
const Store = require('@jawadalik91/electron-store');
const store = new Store({
// We'll call our data file 'user-preferences'
configName: 'user-preferences'
});
store.set('myDataObj', { one: 1, two: 2, three: 3 });
var myDataObj = store.get('myDataObj');
```
### -
```
const store = new Store();
store.set('myDataObj', anything);
var anything = store.get('myDataObj');
```
## Built With
Love for my own use
## Contributing
0 contributors
## Versioning
1.0.0
## Authors
* **Jawad Ali** - *Initial work* - [JawadAlik91](https://github.com/jawadalik91)
## License
This project is licensed under the MIT License
## Acknowledgments
* redux store
* Medium blog
* react-electron boilerplate