Socket
Socket
Sign inDemoInstall

electron-json-config

Package Overview
Dependencies
0
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.4.0 to 1.5.0

2

package.json
{
"name": "electron-json-config",
"version": "1.4.0",
"version": "1.5.0",
"description": "Simply set and get configuration from a json file for your Electron app",

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

@@ -11,4 +11,6 @@ 'use strict';

}
var config = JSON.parse(fs.readFileSync(file));
let config = JSON.parse(fs.readFileSync(file));
exports.file = function() {

@@ -27,2 +29,9 @@ return file;

exports.setBulk = function(items) {
for (let key in items) {
u.set(config, key)(items[key]);
}
u.sync(file, config);
};
exports.get = function(key, defaultValue) {

@@ -46,2 +55,9 @@ const value = u.search(config, key);

exports.deleteBulk = function(keys) {
for (let key of keys) {
u.remove(config, key)();
}
u.sync(file, config);
};
exports.purge = function() {

@@ -48,0 +64,0 @@ config = {};

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc