New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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.2.0 to 4.0.0

CHANGELOG.md

81

package.json
{
"name": "electron-settings",
"version": "3.2.0",
"description": "A simple persistent user settings framework for Electron.",
"main": "index.js",
"scripts": {
"test": "npm run test:main && npm run test:renderer",
"test:main": "electron-mocha tests",
"test:renderer": "electron-mocha tests --renderer"
"version": "4.0.0",
"description": "A simple and robust settings management library for Electron.",
"license": "MIT",
"main": "dist/settings.js",
"types": "dist/settings.d.ts",
"website": "https://electron-settings.js.org/docs",
"author": {
"name": "Nathan Buchar",
"email": "hello@nathanbuchar.com",
"url": "https://www.nathanbuchar.com"
},

@@ -15,4 +18,2 @@ "repository": {

},
"author": "Nathan Buchar <hello@nathanbuchar.com>",
"license": "ISC",
"keywords": [

@@ -26,26 +27,50 @@ "electron",

"storage",
"json",
"has",
"get",
"getAll",
"set",
"setAll",
"delete",
"deleteAll",
"watch",
"file"
"json"
],
"scripts": {
"build": "tsc",
"lint": "eslint src --ext .ts",
"docs": "typedoc && echo \"electron-settings.js.org\" > docs/CNAME",
"release": "standard-version",
"prepublishOnly": "tsc",
"test": "npm run lint && npm run test:main && npm run test:renderer",
"test:main": "electron-mocha --reporter spec --require ts-node/register 'src/**/*.test.ts'",
"test:renderer": "electron-mocha --renderer --reporter spec --require ts-node/register 'src/**/*.test.ts'"
},
"dependencies": {
"clone": "^2.1.1",
"jsonfile": "^4.0.0"
"lodash.get": "^4.4.2",
"lodash.has": "^4.5.2",
"lodash.set": "^4.3.2",
"lodash.unset": "^4.5.2",
"mkdirp": "^1.0.4",
"write-file-atomic": "^3.0.3"
},
"devDependencies": {
"electron": "^1.7.8",
"electron-mocha": "^4.0.3",
"eslint": "^4.7.2",
"eslint-config-airbnb-base": "^12.0.0",
"eslint-plugin-import": "^2.7.0",
"mocha": "^3.5.3",
"randomstring": "^1.1.5"
"@types/lodash.get": "^4.4.6",
"@types/lodash.has": "^4.5.6",
"@types/lodash.set": "^4.3.6",
"@types/lodash.unset": "^4.5.6",
"@types/mkdirp": "^1.0.0",
"@types/mocha": "^7.0.2",
"@types/node": "^14.0.5",
"@types/randomstring": "^1.1.6",
"@types/rimraf": "^3.0.0",
"@types/write-file-atomic": "^3.0.0",
"@typescript-eslint/eslint-plugin": "^3.0.0",
"@typescript-eslint/parser": "^3.0.0",
"electron": "^9.0.0",
"electron-mocha": "^8.2.2",
"eslint": "^7.1.0",
"eslint-config-airbnb-base": "^14.1.0",
"eslint-plugin-import": "^2.20.2",
"randomstring": "^1.1.5",
"rimraf": "^3.0.2",
"standard-version": "^8.0.0",
"ts-node": "^8.10.1",
"typedoc": "^0.17.7",
"typescript": "^3.9.3"
},
"peerDependencies": {
"electron": "^2.0.0"
}
}

@@ -1,4 +0,7 @@

electron-settings
=================
# Electron Settings
A simple and robust settings management library for [Electron](https://electronjs.org).
Born from Atom's original internal configuration manager and the settings manager of choice for Electron's own [API Demos app](https://github.com/electron/electron-api-demos), Electron Settings allows you to persist user settings and other data between app loads simply and easily.
[![Npm version][badge_npm-version]][external_npm]

@@ -8,57 +11,37 @@ [![Npm downloads][badge_npm-downloads]][external_npm]

[![Travis][badge_travis]][external_travis]
[![Gitter][badge_gitter]][external_gitter]
A simple persistent user settings framework for [Electron][external_electron].
Originally adapted from Atom's own configuration manager and the settings manager of choice for [Electron's own demo app](https://github.com/electron/electron-api-demos), electron-settings allows you to persist user settings and other data simply and easily.
Also, you can [subscribe to properties](https://github.com/nathanbuchar/electron-settings/wiki/API-documentation#watch) and get notified when their values change. So that's pretty nifty.
<br/>
### Install
Install
-------
```
$ npm install --save electron-settings
npm install electron-settings
```
### Demo
Demo
----
```ts
import settings from 'electron-settings';
```js
const { app } = require('electron');
const settings = require('electron-settings');
await settings.set('color', {
name: 'cerulean',
code: {
rgb: [0, 179, 230],
hex: '#003BE6'
}
});
app.on('ready', () => {
await settings.get('color.name');
// => "cerulean"
settings.set('name', {
first: 'Cosmo',
last: 'Kramer'
});
settings.get('name.first');
// => "Cosmo"
settings.has('name.middle');
// => false
});
await settings.get('color.code.rgb[1]');
// => 179
```
: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.
### API Docs
API docs and can be found at [electron-settings.js.org](https://electron-settings.js.org).
Resources
---------
* [Wiki][wiki_home]
* [API Documentation][wiki_api]
* [FAQs][wiki_faq]
* [Changelog][wiki_changelog]
* [License (ISC)][license]
<br/>

@@ -74,5 +57,4 @@ <br/>

[docs]: https://nathanbuchar.github.io/electron-settings/
[license]: ./LICENSE.md
[badge_npm-version]: https://img.shields.io/npm/v/electron-settings.svg

@@ -82,9 +64,3 @@ [badge_npm-downloads]: https://img.shields.io/npm/dm/electron-settings.svg

[badge_travis]: https://img.shields.io/travis/nathanbuchar/electron-settings/master.svg
[badge_gitter]: https://img.shields.io/gitter/room/nathanbuchar/electron-settings.svg
[wiki_home]: https://github.com/nathanbuchar/electron-settings/wiki
[wiki_api]: https://github.com/nathanbuchar/electron-settings/wiki/API-documentation
[wiki_faq]: https://github.com/nathanbuchar/electron-settings/wiki/FAQs
[wiki_changelog]: https://github.com/nathanbuchar/electron-settings/wiki/Changelog
[external_david]: https://david-dm.org/nathanbuchar/electron-settings

@@ -91,0 +67,0 @@ [external_electron]: https://electron.atom.io

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