New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

redux-saga-final-form

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

redux-saga-final-form - npm Package Compare versions

Comparing version 2.1.0-2 to 2.1.0-3

9

dist/index.js

@@ -8,3 +8,2 @@ "use strict";

const dispatch = react_redux_1.useDispatch();
const store = react_redux_1.useStore();
return (payload) => {

@@ -15,6 +14,6 @@ const action = {

};
if (!storeMap.has(store)) {
storeMap.set(store, new Map());
if (!storeMap.has(dispatch)) {
storeMap.set(dispatch, new Map());
}
const pendingCallbacks = storeMap.get(store);
const pendingCallbacks = storeMap.get(dispatch);
return new Promise((resolve, reject) => {

@@ -42,3 +41,3 @@ if (!pendingCallbacks.has(resolveActionType)) {

return next => action => {
const pendingCallbacks = storeMap.get(store);
const pendingCallbacks = storeMap.get(store.dispatch);
if (pendingCallbacks) {

@@ -45,0 +44,0 @@ const cbInfos = pendingCallbacks.get(action.type);

{
"name": "redux-saga-final-form",
"version": "2.1.0-2",
"version": "2.1.0-3",
"description": "",

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

import { useDispatch, useStore } from 'react-redux';
import { Middleware, Store } from 'redux'
import { Middleware, Dispatch } from 'redux'

@@ -9,7 +9,6 @@ interface CbInfo {

const storeMap = new WeakMap<Store, Map<string, CbInfo[]>>();
const storeMap = new WeakMap<Dispatch, Map<string, CbInfo[]>>();
export function useListener(startActionType: string, resolveActionType: string, rejectActionType: string, setPayload?: (payload: any) => Object) {
const dispatch = useDispatch();
const store = useStore();
return (payload: any) => {

@@ -20,6 +19,6 @@ const action = {

};
if (!storeMap.has(store)) {
storeMap.set(store, new Map())
if (!storeMap.has(dispatch)) {
storeMap.set(dispatch, new Map())
}
const pendingCallbacks = storeMap.get(store)!;
const pendingCallbacks = storeMap.get(dispatch)!;

@@ -49,3 +48,3 @@ return new Promise((resolve, reject) => {

return next => action => {
const pendingCallbacks = storeMap.get(store as any)!;
const pendingCallbacks = storeMap.get(store.dispatch)!;
if (pendingCallbacks) {

@@ -52,0 +51,0 @@ const cbInfos = pendingCallbacks.get(action.type)!;

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