electron-settings
Advanced tools
Comparing version 3.1.2 to 3.1.3
{ | ||
"name": "electron-settings", | ||
"version": "3.1.2", | ||
"version": "3.1.3", | ||
"description": "A simple persistent user settings framework for Electron.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -31,17 +31,23 @@ electron-settings | ||
```js | ||
const { app } = require('electron'); | ||
const settings = require('electron-settings'); | ||
settings.set('name', { | ||
first: 'Cosmo', | ||
last: 'Kramer' | ||
}); | ||
app.on('ready', () => { | ||
settings.get('name.first'); | ||
// => "Cosmo" | ||
settings.set('name', { | ||
first: 'Cosmo', | ||
last: 'Kramer' | ||
}); | ||
settings.has('name.middle'); | ||
// => false | ||
settings.get('name.first'); | ||
// => "Cosmo" | ||
settings.has('name.middle'); | ||
// => false | ||
}); | ||
``` | ||
:warning: **Please note:** Any and all interaction with electron-settings must be executed after the Electron app has fired the `ready` event, otherwise your app may encounter unexpected errors or data loss. | ||
Resources | ||
@@ -48,0 +54,0 @@ --------- |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
21574
92