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

app-redux-utils

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

app-redux-utils - npm Package Compare versions

Comparing version 1.0.2 to 1.1.0

dist/createActionWithCallback.d.ts

5

dist/createAction.d.ts

@@ -1,3 +0,2 @@

import { AppAction } from "./AppAction";
export declare function createAction(actionType: string, data?: any): AppAction;
export declare function createActionWithCallback(actionType: string, data?: any): (callbackAction?: () => AppAction) => AppAction;
import { AppAction } from "./types";
export declare function createAction(actionType: string, payload?: any): AppAction;

26

dist/createAction.js

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

export function createAction(actionType, data = {}) {
let payload;
if (typeof data === "object" && !Array.isArray(data)) {
payload = Object.assign({}, data);
import { AppAction } from "./types";
export function createAction(actionType, payload = {}) {
let _payload;
if (typeof payload === "object" && !Array.isArray(payload)) {
_payload = Object.assign({}, payload);
}
else {
payload = data;
_payload = payload;
}
return {
type: actionType,
payload,
};
return new AppAction(actionType, _payload);
}
export function createActionWithCallback(actionType, data = {}) {
const action = createAction(actionType, data);
const actionWithCallback = (callbackAction) => {
if (typeof callbackAction === "function") {
return Object.assign(Object.assign({}, action), { callbackAction });
}
return action;
};
return actionWithCallback;
}
//# sourceMappingURL=createAction.js.map

@@ -1,4 +0,4 @@

export { AppAction } from "./AppAction";
export * from "./createAction";
export { createReducers } from "./createReducers";
export { Reducer } from "./Reducer";
export * from "./createActionWithCallback";
export * from "./createReducers";
export * from "./types";
export * from "./createAction";
export { createReducers } from "./createReducers";
export { Reducer } from "./Reducer";
export * from "./createActionWithCallback";
export * from "./createReducers";
export * from "./types";
//# sourceMappingURL=index.js.map
{
"name": "app-redux-utils",
"version": "1.0.2",
"version": "1.1.0",
"description": "Helpful utils for redux",

@@ -5,0 +5,0 @@ "contributors": [

Sorry, the diff of this file is not supported yet

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