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

react-render-defender

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-render-defender - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

22

lib/index.js

@@ -7,13 +7,13 @@ 'use strict';

exports.default = logAllUpdates;
var comparePropsAndState = function comparePropsAndState(component, prevProps, prevState) {
var getCustomSettings = function getCustomSettings() {
var opts = {};
try {
return opts = require(process.env.ROOT + '/rdefender.json');
} catch (err) {}
return opts;
};
var getCustomSettings = function getCustomSettings() {
var customSettings = {};
try {
customSettings = require(process.env.ROOT + '/rdefender.json');
} catch (err) {}
return customSettings;
};
var customSettings = getCustomSettings();
var customSettings = getCustomSettings();
var comparePropsAndState = function comparePropsAndState(component, prevProps, prevState) {
var propChanges = [];

@@ -48,5 +48,5 @@ var stateChanges = [];

var timeRenderDiff = newRenderTimeStamp - this.previousRenderTimeStamp;
var threshold = settings[this.constructor.name] || 200;
var threshold = customSettings[this.constructor.name] || 200;
if (!settings.quiet_mode) {
if (!customSettings.quiet_mode) {
if (timeRenderDiff < threshold) {

@@ -53,0 +53,0 @@ var diff = comparePropsAndState(this, prevProps, prevState);

@@ -39,3 +39,3 @@ {

},
"version": "1.1.0"
"version": "1.1.1"
}

@@ -1,12 +0,12 @@

const comparePropsAndState = (component, prevProps, prevState) => {
const getCustomSettings = () => {
let opts = {} ;
try {
return opts = require(process.env.ROOT+'/rdefender.json');
} catch(err) {}
return opts;
}
const getCustomSettings = () => {
let customSettings = {} ;
try {
customSettings = require(process.env.ROOT+'/rdefender.json');
} catch(err) {}
return customSettings;
}
const customSettings = getCustomSettings();
const customSettings = getCustomSettings();
const comparePropsAndState = (component, prevProps, prevState) => {
const propChanges = [];

@@ -41,5 +41,5 @@ const stateChanges = [];

const timeRenderDiff = newRenderTimeStamp - this.previousRenderTimeStamp;
const threshold = settings[this.constructor.name] || 200
const threshold = customSettings[this.constructor.name] || 200
if(!settings.quiet_mode) {
if(!customSettings.quiet_mode) {
if (timeRenderDiff < threshold) {

@@ -46,0 +46,0 @@ const diff = comparePropsAndState(this, prevProps, prevState);

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