source: node_modules/redux-thunk/dist/cjs/redux-thunk.cjs@ a762898

Last change on this file since a762898 was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago

Added visualizations

  • Property mode set to 100644
File size: 1.4 KB
Line 
1"use strict";
2var __defProp = Object.defineProperty;
3var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4var __getOwnPropNames = Object.getOwnPropertyNames;
5var __hasOwnProp = Object.prototype.hasOwnProperty;
6var __export = (target, all) => {
7 for (var name in all)
8 __defProp(target, name, { get: all[name], enumerable: true });
9};
10var __copyProps = (to, from, except, desc) => {
11 if (from && typeof from === "object" || typeof from === "function") {
12 for (let key of __getOwnPropNames(from))
13 if (!__hasOwnProp.call(to, key) && key !== except)
14 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15 }
16 return to;
17};
18var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
20// src/index.ts
21var src_exports = {};
22__export(src_exports, {
23 thunk: () => thunk,
24 withExtraArgument: () => withExtraArgument
25});
26module.exports = __toCommonJS(src_exports);
27function createThunkMiddleware(extraArgument) {
28 const middleware = ({ dispatch, getState }) => (next) => (action) => {
29 if (typeof action === "function") {
30 return action(dispatch, getState, extraArgument);
31 }
32 return next(action);
33 };
34 return middleware;
35}
36var thunk = createThunkMiddleware();
37var withExtraArgument = createThunkMiddleware;
38// Annotate the CommonJS export names for ESM import in node:
390 && (module.exports = {
40 thunk,
41 withExtraArgument
42});
Note: See TracBrowser for help on using the repository browser.