Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

electron-settings

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

electron-settings - npm Package Compare versions

Comparing version 3.1.3 to 3.1.4

12

lib/settings.js

@@ -301,7 +301,8 @@ /**

* @param {string} keyPath
* @param {any} [defaultValue]
* @param {any} defaultValue
* @param {Object} opts
* @returns {any}
* @private
*/
_getValueAtKeyPath(keyPath, defaultValue) {
_getValueAtKeyPath(keyPath, defaultValue, opts) {
const obj = this._readSettings();

@@ -316,3 +317,3 @@

if (!exists && typeof defaultValue !== 'undefined') {
this._setValueAtKeyPath(keyPath, defaultValue);
this._setValueAtKeyPath(keyPath, defaultValue, opts);

@@ -424,9 +425,10 @@ // Get the new value now that the default has been set.

* @param {any} [defaultValue]
* @param {Object} [opts={}]
* @returns {any}
* @public
*/
get(keyPath, defaultValue) {
get(keyPath, defaultValue, opts = {}) {
assert.strictEqual(typeof keyPath, 'string', 'First parameter must be a string. Did you mean to use `getAll()` instead?');
return this._getValueAtKeyPath(keyPath, defaultValue);
return this._getValueAtKeyPath(keyPath, defaultValue, opts);
}

@@ -433,0 +435,0 @@

{
"name": "electron-settings",
"version": "3.1.3",
"version": "3.1.4",
"description": "A simple persistent user settings framework for Electron.",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc