1.1.0 • Published 6 months ago

electron-store-data v1.1.0

Weekly downloads
3
License
MIT
Repository
github
Last release
6 months ago

electron-store-data

npm license

A Node.js module to store Electron data in the computer.

Installation

# npm
npm i electron-store-data

# pnpm
pnpm add electron-store-data

# yarn
yarn add electron-store-data

Usage

// include module
const Store = require('electron-store-data')

// initialize
const storeWindow = new Store({
  filename: 'window', // will be window.json
  defaults: {
    bounds: { x: '', y: '', width: 900, height: 500 }
  }
})

// get
console.log(storeWindow.get('bounds'))
// { x: '', y: '', width: 900, height: 500 }

// set
storeWindow.set('bounds', { x: 500, y: 200, width: 800, height: 450 })

// delete
storeWindow.delete('bounds')

Contribution

Feel free to contribute. Open a new issue, or make a pull request.

License

MIT

1.1.0

6 months ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

8 years ago

0.1.0

8 years ago

0.0.1

8 years ago