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

configuration

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

configuration - npm Package Compare versions

Comparing version 4.1.4 to 4.1.5

11

dist/index.js

@@ -54,9 +54,8 @@ /* IMPORT */

for (const data of this.handlers) {
if (Lang.isNullary(data.callback)) { //TODO: This is not exactly correct, something might have been changed while the flattened configuration could still be the same, but this is much faster
const value = data.getter();
if ((Lang.isUndefined(data.value) || !Lang.isPrimitive(data.value)) && !Lang.isPrimitive(value) && Lang.isNullary(data.callback)) { //TODO: This is not exactly correct, something might have been changed while the flattened configuration could still be the same, but this is much faster
data.callback();
data.value = value;
}
else {
const value = data.getter();
if (Lang.isEqual(data.value, value))
continue;
else if (!Lang.isEqual(data.value, value)) {
const valueNext = Lang.cloneDeep(value);

@@ -224,3 +223,3 @@ data.callback(valueNext, data.value);

const valueRaw = getter();
const value = !Lang.isNullary(callback) ? Lang.cloneDeep(valueRaw) : undefined;
const value = Lang.isPrimitive(valueRaw) || !Lang.isNullary(callback) ? Lang.cloneDeep(valueRaw) : undefined;
const data = { callback, getter, value };

@@ -227,0 +226,0 @@ handlers.push(data);

@@ -5,3 +5,3 @@ {

"description": "Performant and feature rich library for managing configurations/settings.",
"version": "4.1.4",
"version": "4.1.5",
"type": "module",

@@ -8,0 +8,0 @@ "sideEffects": false,

@@ -107,12 +107,12 @@

if ( Lang.isNullary ( data.callback ) ) { //TODO: This is not exactly correct, something might have been changed while the flattened configuration could still be the same, but this is much faster
const value = data.getter ();
if ( ( Lang.isUndefined ( data.value ) || !Lang.isPrimitive ( data.value ) ) && !Lang.isPrimitive ( value ) && Lang.isNullary ( data.callback ) ) { //TODO: This is not exactly correct, something might have been changed while the flattened configuration could still be the same, but this is much faster
data.callback ();
} else {
data.value = value;
const value = data.getter ();
} else if ( !Lang.isEqual ( data.value, value ) ) {
if ( Lang.isEqual ( data.value, value ) ) continue;
const valueNext = Lang.cloneDeep ( value );

@@ -397,3 +397,3 @@

const valueRaw = getter ();
const value = !Lang.isNullary ( callback ) ? Lang.cloneDeep ( valueRaw ) : undefined;
const value = Lang.isPrimitive ( valueRaw ) || !Lang.isNullary ( callback ) ? Lang.cloneDeep ( valueRaw ) : undefined;
const data: ChangeHandlerData = {callback, getter, value};

@@ -400,0 +400,0 @@

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