New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@nexcodepl/store

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nexcodepl/store - npm Package Compare versions

Comparing version
1.0.13
to
1.0.14
+2
-0
dist/store.d.ts

@@ -10,4 +10,6 @@ import { StoreConfig, StoreReadonly, StoreSetState, StoreSubscriber } from "./types.js";

set(setState: StoreSetState<T>): void;
set(setState: StoreSetState<T>, returnValue: "always"): T;
set(setState: StoreSetState<T>, returnValue: "updated"): T | undefined;
}
export declare function getStoreReadonly<T>(store: Store<T>): StoreReadonly<T>;
export declare function isStoreReadonly<T = unknown>(e: StoreReadonly<T> | unknown): e is StoreReadonly<T>;

@@ -21,3 +21,3 @@ import { compare } from "./compare.js";

}
set(setState) {
set(setState, returnValue) {
const newStateBase = this._config?.stateCopyFunction

@@ -30,2 +30,4 @@ ? this._config.stateCopyFunction(this._state)

if (!this._config.shouldStateUpdate(this._state, newState)) {
if (returnValue === "always")
return this._state;
return;

@@ -35,2 +37,4 @@ }

else if (compare(this._state, newState, 2)) {
if (returnValue === "always")
return this._state;
return;

@@ -41,2 +45,4 @@ }

this._subscribersSet.forEach(s => s(this._state));
if (returnValue)
return this._state;
}

@@ -43,0 +49,0 @@ }

+1
-1
{
"name": "@nexcodepl/store",
"version": "1.0.13",
"version": "1.0.14",
"description": "State management library",

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