electron-settings
Advanced tools
Comparing version 3.1.4 to 3.2.0
@@ -21,17 +21,2 @@ /** | ||
/** | ||
* A reference to the Electron app. If this framework is required within a | ||
* renderer processes, we need to load the app via `remote`. | ||
* | ||
* @type {string} | ||
*/ | ||
const app = electron.app || electron.remote.app; | ||
/** | ||
* The Electron app's user data path. | ||
* | ||
* @type {string} | ||
*/ | ||
const userDataPath = app.getPath('userData'); | ||
/** | ||
* The name of the settings file. | ||
@@ -44,9 +29,2 @@ * | ||
/** | ||
* The absolute path to the settings file. | ||
* | ||
* @type {string} | ||
*/ | ||
const defaultSettingsFilePath = path.join(userDataPath, defaultSettingsFileName); | ||
/** | ||
* The electron-settings class. | ||
@@ -63,10 +41,2 @@ * | ||
/** | ||
* The absolute path to the default settings file on the disk. | ||
* | ||
* @type {string} | ||
* @private | ||
*/ | ||
this._defaultSettingsFilePath = defaultSettingsFilePath; | ||
/** | ||
* The absolute path to the custom settings file on the disk. | ||
@@ -106,5 +76,9 @@ * | ||
_getSettingsFilePath() { | ||
return this._customSettingsFilePath ? | ||
this._customSettingsFilePath : | ||
this._defaultSettingsFilePath; | ||
if (this._customSettingsFilePath) return this._customSettingsFilePath; | ||
const app = electron.app || electron.remote.app; | ||
const userDataPath = app.getPath('userData'); | ||
const defaultSettingsFilePath = path.join(userDataPath, defaultSettingsFileName); | ||
return defaultSettingsFilePath; | ||
} | ||
@@ -111,0 +85,0 @@ |
{ | ||
"name": "electron-settings", | ||
"version": "3.1.4", | ||
"version": "3.2.0", | ||
"description": "A simple persistent user settings framework for Electron.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
21141
7
630