Socket
Socket
Sign inDemoInstall

zustand-fetching

Package Overview
Dependencies
9
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.4-beta to 1.0.4

5

dist/helpers/zustandGroupSlice.d.ts

@@ -14,2 +14,5 @@ import { StoreApi } from "zustand";

}
export declare const createGroupSlice: <Payload, Result, State extends Record<string, any>, K extends keyof State>(set: (partial: State | Partial<State> | ((state: State) => State | Partial<State>), replace?: boolean | undefined) => void, get: () => State, name: K, payloadCreator: (params: IGroupRequestParams<Payload>) => Promise<Result>, extraArgument?: IExtraReaction<IGroupRequestParams<Payload>, Result> | undefined) => Record<K, ICreateGroupRequests<Payload, Result>>;
export declare const createGroupSlice: <Payload, Result, State extends Record<string, any>, K extends keyof State>(set: (partial: State | Partial<State> | ((state: State) => State | Partial<State>), replace?: boolean | undefined) => void, get: () => State, name: K, payloadCreator: (params: {
key: string;
payload: Payload;
}) => Promise<Result>, extraArgument?: IExtraReaction<IGroupRequestParams<Payload>, Result> | undefined) => Record<K, ICreateGroupRequests<Payload, Result>>;

2

dist/helpers/zustandModal.d.ts

@@ -26,2 +26,3 @@ import { StoreApi } from "zustand";

reaction?: ((params: IModalActionType<Data, M>) => any) | undefined;
doNotClearOnClose?: boolean | undefined;
} | undefined) => IModalCreator<Data, M>;

@@ -48,2 +49,3 @@ /**

reaction?: ((params: IModalActionType<Data, M>) => any) | undefined;
doNotClearOnClose?: boolean | undefined;
} | undefined) => Record<K, IModalCreator<Data, M>>;

@@ -6,3 +6,6 @@ /* eslint-disable @typescript-eslint/no-explicit-any */

if (params.type === "CLOSE") {
set({ isOpen: false, data: initialState });
set({
isOpen: false,
data: (extra === null || extra === void 0 ? void 0 : extra.doNotClearOnClose) ? get().data : initialState,
});
}

@@ -9,0 +12,0 @@ else if (params.type === "OPEN") {

@@ -97,12 +97,9 @@ /* eslint-disable @typescript-eslint/no-explicit-any */

.catch((error) => {
var _a, _b, _c;
var _a, _b;
if (error.message === "The user aborted a request.") {
(_a = extra === null || extra === void 0 ? void 0 : extra.abortReaction) === null || _a === void 0 ? void 0 : _a.call(extra, params);
}
else if (error instanceof Error) {
else {
(_b = extra === null || extra === void 0 ? void 0 : extra.rejectedReaction) === null || _b === void 0 ? void 0 : _b.call(extra, params, error);
}
else {
(_c = extra === null || extra === void 0 ? void 0 : extra.rejectedReaction) === null || _c === void 0 ? void 0 : _c.call(extra, params, "Unknown Failure");
}
})

@@ -109,0 +106,0 @@ .finally(() => {

{
"name": "zustand-fetching",
"version": "1.0.4-beta",
"version": "1.0.4",
"private": false,

@@ -79,3 +79,3 @@ "description": "Zustand fetching helpers",

"react": ">=17",
"zustand": ">=3"
"zustand": ">=4"
},

@@ -82,0 +82,0 @@ "engines": {

@@ -127,3 +127,3 @@ # Zustand Fetching Helpers

{status === "loading" && <>loading...</>}
{status === "error" && <>{error}</>}
{status === "error" && <>{error.result.message}</>}
</>

@@ -130,0 +130,0 @@ }

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc