Local Store Key Value For Electron
npm install electron-local-key-value
This package can use both main process and renderer process
const Store = require('electron-local-key-value');
const storage = new Store({
filename: 'app-config',
default: {}
});
storage.set('KEY', 'value');
console.log(storage.get('KEY'));
// Result : 'value';
console.log(storage.get('KEY_NOT_FOUND'));
// Result : underfined;
store.commit(); // Save to file