Socket
Socket
Sign inDemoInstall

redux-thunk

Package Overview
Dependencies
3
Maintainers
3
Versions
23
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.0.0-alpha.0 to 3.0.0-alpha.1

17

dist/redux-thunk.js
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.ReduxThunk = factory());
})(this, (function () { 'use strict';
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.ReduxThunk = {}));
})(this, (function (exports) { 'use strict';

@@ -34,9 +34,12 @@ /** A function that accepts a potential "extra argument" value to be injected later,

var thunk = createThunkMiddleware(); // Attach the factory function so users can create a customized version
var thunk = createThunkMiddleware(); // Export the factory function so users can create a customized version
// with whatever "extra arg" they want to inject into their thunks
thunk.withExtraArgument = createThunkMiddleware;
var withExtraArgument = createThunkMiddleware;
return thunk;
exports.thunk = thunk;
exports.withExtraArgument = withExtraArgument;
Object.defineProperty(exports, '__esModule', { value: true });
}));

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

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).ReduxThunk=t()}(this,(function(){"use strict";function e(e){return function(t){var n=t.dispatch,u=t.getState;return function(t){return function(o){return"function"==typeof o?o(n,u,e):t(o)}}}}var t=e();return t.withExtraArgument=e,t}));
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ReduxThunk={})}(this,(function(e){"use strict";function t(e){return function(t){var n=t.dispatch,o=t.getState;return function(t){return function(u){return"function"==typeof u?u(n,o,e):t(u)}}}}var n=t(),o=t;e.thunk=n,e.withExtraArgument=o,Object.defineProperty(e,"__esModule",{value:!0})}));
import type { Action, AnyAction } from 'redux';
import type { ThunkMiddleware } from './types';
export type { ThunkAction, ThunkDispatch, ThunkActionDispatch, ThunkMiddleware } from './types';
declare const thunk: ThunkMiddleware<any, AnyAction, undefined> & {
/** A function that accepts a potential "extra argument" value to be injected later,
* and returns an instance of the thunk middleware that uses that value
*/
declare function createThunkMiddleware<State = any, BasicAction extends Action = AnyAction, ExtraThunkArg = undefined>(extraArgument?: ExtraThunkArg): ThunkMiddleware<State, BasicAction, ExtraThunkArg>;
export declare const thunk: ThunkMiddleware<any, AnyAction, undefined> & {
withExtraArgument<ExtraThunkArg, State = any, BasicAction extends Action<any> = AnyAction>(extraArgument: ExtraThunkArg): ThunkMiddleware<State, BasicAction, ExtraThunkArg>;
};
export default thunk;
export declare const withExtraArgument: typeof createThunkMiddleware;

@@ -28,6 +28,5 @@ /** A function that accepts a potential "extra argument" value to be injected later,

var thunk = createThunkMiddleware(); // Attach the factory function so users can create a customized version
export var thunk = createThunkMiddleware(); // Export the factory function so users can create a customized version
// with whatever "extra arg" they want to inject into their thunks
thunk.withExtraArgument = createThunkMiddleware;
export default thunk;
export var withExtraArgument = createThunkMiddleware;

@@ -6,3 +6,3 @@ "use strict";

});
exports.default = void 0;
exports.withExtraArgument = exports.thunk = void 0;

@@ -36,7 +36,7 @@ /** A function that accepts a potential "extra argument" value to be injected later,

var thunk = createThunkMiddleware(); // Attach the factory function so users can create a customized version
var thunk = createThunkMiddleware(); // Export the factory function so users can create a customized version
// with whatever "extra arg" they want to inject into their thunks
thunk.withExtraArgument = createThunkMiddleware;
var _default = thunk;
exports.default = _default;
exports.thunk = thunk;
var withExtraArgument = createThunkMiddleware;
exports.withExtraArgument = withExtraArgument;
{
"name": "redux-thunk",
"version": "3.0.0-alpha.0",
"version": "3.0.0-alpha.1",
"license": "MIT",

@@ -5,0 +5,0 @@ "description": "Thunk middleware for Redux.",

@@ -39,3 +39,3 @@ import type { Action, AnyAction } from 'redux'

const thunk = createThunkMiddleware() as ThunkMiddleware & {
export const thunk = createThunkMiddleware() as ThunkMiddleware & {
withExtraArgument<

@@ -50,6 +50,4 @@ ExtraThunkArg,

// Attach the factory function so users can create a customized version
// Export the factory function so users can create a customized version
// with whatever "extra arg" they want to inject into their thunks
thunk.withExtraArgument = createThunkMiddleware
export default thunk
export const withExtraArgument = createThunkMiddleware
SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc