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

cat-settings

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cat-settings - npm Package Compare versions

Comparing version 0.9.0 to 0.9.1

38

index.js

@@ -13,2 +13,5 @@ var jf = require('jsonfile')

configurable: false,
/**
* Cleans all settings properties without saving
*/
value: function() {

@@ -31,2 +34,7 @@ for (var property in this) {

configurable: false,
/**
* Sets all object properties to same in settings without cleaning and saving
*
* @param {Object} settings
*/
value: function(settings) {

@@ -50,2 +58,8 @@ for (var property in settings) {

configurable: false,
/**
* Asynchronously loads object from JSON file
*
* @param {String} [file]
* @param {Function} callback
*/
value: function(file, callback) {

@@ -58,6 +72,6 @@ if (file) {

if (err) {
return callback(err);
return callback(err, null);
}
this._set(settings);
callback(null);
callback(null, this);
});

@@ -75,2 +89,8 @@ }

configurable: false,
/**
* Synchronously loads object from JSON file
*
* @param {String} [file]
* @returns {Object}
*/
value: function(file) {

@@ -83,2 +103,3 @@ if (file) {

this._set(settings);
return this;
}

@@ -95,2 +116,8 @@ }

configurable: false,
/**
* Asynchronously saves object to JSON file
*
* @param {String} [file]
* @param {Function} callback
*/
value: function(file, callback) {

@@ -112,2 +139,7 @@ if (file) {

configurable: false,
/**
* Synchronously saves object to JSON file
*
* @param {String} [file]
*/
value: function(file) {

@@ -120,2 +152,2 @@ if (file) {

}
);
);

2

package.json
{
"name": "cat-settings",
"description": "Provides simple API to access and modify application settings, stored in JSON-file",
"version": "0.9.0",
"version": "0.9.1",
"dependencies": {

@@ -6,0 +6,0 @@ "jsonfile": "*"

@@ -17,4 +17,3 @@ # cat-settings

```javascript
var settings = require('cat-settings');
settings.loadSync(__dirname + '/settings.json');
var settings = require('cat-settings').loadSync(__dirname + '/settings.json');

@@ -21,0 +20,0 @@ // You may also use async load if it makes sense

Sorry, the diff of this file is not supported yet

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