redux-thunk.js 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. (function webpackUniversalModuleDefinition(root, factory) {
  2. if(typeof exports === 'object' && typeof module === 'object')
  3. module.exports = factory();
  4. else if(typeof define === 'function' && define.amd)
  5. define([], factory);
  6. else if(typeof exports === 'object')
  7. exports["ReduxThunk"] = factory();
  8. else
  9. root["ReduxThunk"] = factory();
  10. })(this, function() {
  11. return /******/ (function(modules) { // webpackBootstrap
  12. /******/ // The module cache
  13. /******/ var installedModules = {};
  14. /******/ // The require function
  15. /******/ function __webpack_require__(moduleId) {
  16. /******/ // Check if module is in cache
  17. /******/ if(installedModules[moduleId])
  18. /******/ return installedModules[moduleId].exports;
  19. /******/ // Create a new module (and put it into the cache)
  20. /******/ var module = installedModules[moduleId] = {
  21. /******/ exports: {},
  22. /******/ id: moduleId,
  23. /******/ loaded: false
  24. /******/ };
  25. /******/ // Execute the module function
  26. /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  27. /******/ // Flag the module as loaded
  28. /******/ module.loaded = true;
  29. /******/ // Return the exports of the module
  30. /******/ return module.exports;
  31. /******/ }
  32. /******/ // expose the modules object (__webpack_modules__)
  33. /******/ __webpack_require__.m = modules;
  34. /******/ // expose the module cache
  35. /******/ __webpack_require__.c = installedModules;
  36. /******/ // __webpack_public_path__
  37. /******/ __webpack_require__.p = "";
  38. /******/ // Load entry module and return exports
  39. /******/ return __webpack_require__(0);
  40. /******/ })
  41. /************************************************************************/
  42. /******/ ([
  43. /* 0 */
  44. /***/ (function(module, exports, __webpack_require__) {
  45. module.exports = __webpack_require__(1);
  46. /***/ }),
  47. /* 1 */
  48. /***/ (function(module, exports) {
  49. 'use strict';
  50. exports.__esModule = true;
  51. function createThunkMiddleware(extraArgument) {
  52. return function (_ref) {
  53. var dispatch = _ref.dispatch,
  54. getState = _ref.getState;
  55. return function (next) {
  56. return function (action) {
  57. if (typeof action === 'function') {
  58. return action(dispatch, getState, extraArgument);
  59. }
  60. return next(action);
  61. };
  62. };
  63. };
  64. }
  65. var thunk = createThunkMiddleware();
  66. thunk.withExtraArgument = createThunkMiddleware;
  67. exports['default'] = thunk;
  68. /***/ })
  69. /******/ ])
  70. });
  71. ;