{"_id":"redux-thunk-fsa","_rev":"11-59cc0d55a7ca9988ae35150f8e177f23","name":"redux-thunk-fsa","description":"FSA compliant thunk middleware for Redux.","dist-tags":{"latest":"4.1.1"},"versions":{"3.0.0":{"name":"redux-thunk-fsa","version":"3.0.0","description":"FSA compliant thunk middleware for Redux.","main":"lib/index.js","jsnext:main":"es/index.js","files":["lib","es","src","dist"],"scripts":{"clean":"rimraf lib dist es","build":"npm run build:commonjs && npm run build:umd && npm run build:umd:min && npm run build:es","prepublish":"npm run clean && npm run test && npm run build","posttest":"npm run lint","lint":"eslint src test","test":"cross-env BABEL_ENV=commonjs mocha --compilers js:babel-core/register --reporter spec test/*.js","build:commonjs":"cross-env BABEL_ENV=commonjs babel src --out-dir lib","build:es":"cross-env BABEL_ENV=es babel src --out-dir es","build:umd":"cross-env BABEL_ENV=commonjs NODE_ENV=development webpack","build:umd:min":"cross-env BABEL_ENV=commonjs NODE_ENV=production webpack"},"repository":{"type":"git","url":"git+https://github.com/gaearon/redux-thunk.git"},"homepage":"https://github.com/gaearon/redux-thunk","keywords":["redux","thunk","middleware","redux-middleware","flux","fsa"],"author":{"name":"Dan Abramov","email":"dan.abramov@me.com"},"contributors":[{"name":"Vitaly Aminev","email":"v@makeomatic.ru"}],"license":"MIT","devDependencies":{"babel-cli":"^6.6.5","babel-core":"^6.6.5","babel-eslint":"^6.0.0","babel-loader":"^6.2.4","babel-plugin-check-es2015-constants":"^6.6.5","babel-plugin-transform-es2015-arrow-functions":"^6.5.2","babel-plugin-transform-es2015-block-scoped-functions":"^6.6.5","babel-plugin-transform-es2015-block-scoping":"^6.6.5","babel-plugin-transform-es2015-classes":"^6.6.5","babel-plugin-transform-es2015-computed-properties":"^6.6.5","babel-plugin-transform-es2015-destructuring":"^6.6.5","babel-plugin-transform-es2015-for-of":"^6.6.0","babel-plugin-transform-es2015-function-name":"^6.5.0","babel-plugin-transform-es2015-literals":"^6.5.0","babel-plugin-transform-es2015-modules-commonjs":"^6.6.5","babel-plugin-transform-es2015-object-super":"^6.6.5","babel-plugin-transform-es2015-parameters":"^6.6.5","babel-plugin-transform-es2015-shorthand-properties":"^6.5.0","babel-plugin-transform-es2015-spread":"^6.6.5","babel-plugin-transform-es2015-sticky-regex":"^6.5.0","babel-plugin-transform-es2015-template-literals":"^6.6.5","babel-plugin-transform-es2015-unicode-regex":"^6.5.0","babel-plugin-transform-es3-member-expression-literals":"^6.5.0","babel-plugin-transform-es3-property-literals":"^6.5.0","babel-plugin-transform-object-rest-spread":"^6.8.0","chai":"^3.2.0","cross-env":"^1.0.7","eslint":"^2.0.0","eslint-config-airbnb":"^9.0.0","eslint-plugin-import":"^1.7.0","eslint-plugin-jsx-a11y":"^1.2.0","eslint-plugin-react":"^5.0.0","mocha":"^2.2.5","rimraf":"^2.5.2","webpack":"^1.12.14"},"dependencies":{"flux-standard-action":"^0.6.1"},"gitHead":"0cb838d088aa6463ad6d8a5a57ede10ca82a5b4d","bugs":{"url":"https://github.com/gaearon/redux-thunk/issues"},"_id":"redux-thunk-fsa@3.0.0","_shasum":"90700d36e3ed178f31225fb27dd4e4dbf3bf89d0","_from":".","_npmVersion":"3.6.0","_nodeVersion":"5.0.0","_npmUser":{"name":"avvs","email":"v@aminev.me"},"dist":{"shasum":"90700d36e3ed178f31225fb27dd4e4dbf3bf89d0","tarball":"https://registry.npmjs.org/redux-thunk-fsa/-/redux-thunk-fsa-3.0.0.tgz","integrity":"sha512-lZM7Wo7r31ZYKNUK6mwJVTrhqIVzzsmXvmkht+zAApR9zYNiYEIChvnG63sYLq2nj/bMPEffMMLy4FD7XrGaRg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDBoy3hd8I5kwiyGvX4mxMPQlnESPuvaHIqQq4ZBZPXDQIhAL0AbswsiuQ4oP/pbLj3FLOEcS3h/wCl8wmXcaDmA3pf"}]},"maintainers":[{"name":"avvs","email":"v@aminev.me"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/redux-thunk-fsa-3.0.0.tgz_1462864085804_0.20342722325585783"},"directories":{}},"3.0.1":{"name":"redux-thunk-fsa","version":"3.0.1","description":"FSA compliant thunk middleware for Redux.","main":"lib/index.js","jsnext:main":"es/index.js","files":["lib","es","src","dist"],"scripts":{"clean":"rimraf lib dist es","build":"npm run build:commonjs && npm run build:umd && npm run build:umd:min && npm run build:es","prepublish":"npm run clean && npm run test && npm run build","posttest":"npm run lint","lint":"eslint src test","test":"cross-env BABEL_ENV=commonjs mocha --compilers js:babel-core/register --reporter spec test/*.js","build:commonjs":"cross-env BABEL_ENV=commonjs babel src --out-dir lib","build:es":"cross-env BABEL_ENV=es babel src --out-dir es","build:umd":"cross-env BABEL_ENV=commonjs NODE_ENV=development webpack","build:umd:min":"cross-env BABEL_ENV=commonjs NODE_ENV=production webpack"},"repository":{"type":"git","url":"git+https://github.com/gaearon/redux-thunk.git"},"homepage":"https://github.com/gaearon/redux-thunk","keywords":["redux","thunk","middleware","redux-middleware","flux","fsa"],"author":{"name":"Dan Abramov","email":"dan.abramov@me.com"},"contributors":[{"name":"Vitaly Aminev","email":"v@makeomatic.ru"}],"license":"MIT","devDependencies":{"babel-cli":"^6.6.5","babel-core":"^6.6.5","babel-eslint":"^6.0.0","babel-loader":"^6.2.4","babel-plugin-check-es2015-constants":"^6.6.5","babel-plugin-transform-es2015-arrow-functions":"^6.5.2","babel-plugin-transform-es2015-block-scoped-functions":"^6.6.5","babel-plugin-transform-es2015-block-scoping":"^6.6.5","babel-plugin-transform-es2015-classes":"^6.6.5","babel-plugin-transform-es2015-computed-properties":"^6.6.5","babel-plugin-transform-es2015-destructuring":"^6.6.5","babel-plugin-transform-es2015-for-of":"^6.6.0","babel-plugin-transform-es2015-function-name":"^6.5.0","babel-plugin-transform-es2015-literals":"^6.5.0","babel-plugin-transform-es2015-modules-commonjs":"^6.6.5","babel-plugin-transform-es2015-object-super":"^6.6.5","babel-plugin-transform-es2015-parameters":"^6.6.5","babel-plugin-transform-es2015-shorthand-properties":"^6.5.0","babel-plugin-transform-es2015-spread":"^6.6.5","babel-plugin-transform-es2015-sticky-regex":"^6.5.0","babel-plugin-transform-es2015-template-literals":"^6.6.5","babel-plugin-transform-es2015-unicode-regex":"^6.5.0","babel-plugin-transform-es3-member-expression-literals":"^6.5.0","babel-plugin-transform-es3-property-literals":"^6.5.0","babel-plugin-transform-object-rest-spread":"^6.8.0","chai":"^3.2.0","cross-env":"^1.0.7","eslint":"^2.0.0","eslint-config-airbnb":"^9.0.0","eslint-plugin-import":"^1.7.0","eslint-plugin-jsx-a11y":"^1.2.0","eslint-plugin-react":"^5.0.0","mocha":"^2.2.5","rimraf":"^2.5.2","webpack":"^1.12.14"},"dependencies":{"flux-standard-action":"^0.6.1"},"gitHead":"5e91082d9fd8cdfdb1b0476d9cc5d9fe0e3d721f","bugs":{"url":"https://github.com/gaearon/redux-thunk/issues"},"_id":"redux-thunk-fsa@3.0.1","_shasum":"fe41e2dd71b4c2006ed1f96d793e5a9fcc353e65","_from":".","_npmVersion":"3.6.0","_nodeVersion":"5.0.0","_npmUser":{"name":"avvs","email":"v@aminev.me"},"dist":{"shasum":"fe41e2dd71b4c2006ed1f96d793e5a9fcc353e65","tarball":"https://registry.npmjs.org/redux-thunk-fsa/-/redux-thunk-fsa-3.0.1.tgz","integrity":"sha512-cv8W8wNMVpQDUskcxl12a9Sat7xqeSUMcfx1FKQ8jgIrX3tC+39IAPLtQegruJxCml9n3upGpq2XJBvtSM+PUg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDq1ewpJJ9RDfBej7xcK3MnNu+uYB/mQNzY9CuVGfPzygIhAL6F/IMeLH18rARZdo7PK2z4GXZWOdOnQNypUuqkSM3U"}]},"maintainers":[{"name":"avvs","email":"v@aminev.me"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/redux-thunk-fsa-3.0.1.tgz_1462864535962_0.6873500787187368"},"directories":{}},"3.0.2":{"name":"redux-thunk-fsa","version":"3.0.2","description":"FSA compliant thunk middleware for Redux.","main":"lib/index.js","jsnext:main":"es/index.js","files":["lib","es","src","dist"],"scripts":{"clean":"rimraf lib dist es","build":"npm run build:commonjs && npm run build:umd && npm run build:umd:min && npm run build:es","prepublish":"npm run clean && npm run test && npm run build","posttest":"npm run lint","lint":"eslint src test","test":"cross-env BABEL_ENV=commonjs mocha --compilers js:babel-core/register --reporter spec test/*.js","build:commonjs":"cross-env BABEL_ENV=commonjs babel src --out-dir lib","build:es":"cross-env BABEL_ENV=es babel src --out-dir es","build:umd":"cross-env BABEL_ENV=commonjs NODE_ENV=development webpack","build:umd:min":"cross-env BABEL_ENV=commonjs NODE_ENV=production webpack"},"repository":{"type":"git","url":"git+https://github.com/makeomatic/redux-thunk.git"},"homepage":"https://github.com/makeomatic/redux-thunk","keywords":["redux","thunk","middleware","redux-middleware","flux","fsa"],"author":{"name":"Dan Abramov","email":"dan.abramov@me.com"},"contributors":[{"name":"Vitaly Aminev","email":"v@makeomatic.ru"}],"license":"MIT","devDependencies":{"babel-cli":"^6.6.5","babel-core":"^6.6.5","babel-eslint":"^6.0.0","babel-loader":"^6.2.4","babel-plugin-check-es2015-constants":"^6.6.5","babel-plugin-transform-es2015-arrow-functions":"^6.5.2","babel-plugin-transform-es2015-block-scoped-functions":"^6.6.5","babel-plugin-transform-es2015-block-scoping":"^6.6.5","babel-plugin-transform-es2015-classes":"^6.6.5","babel-plugin-transform-es2015-computed-properties":"^6.6.5","babel-plugin-transform-es2015-destructuring":"^6.6.5","babel-plugin-transform-es2015-for-of":"^6.6.0","babel-plugin-transform-es2015-function-name":"^6.5.0","babel-plugin-transform-es2015-literals":"^6.5.0","babel-plugin-transform-es2015-modules-commonjs":"^6.6.5","babel-plugin-transform-es2015-object-super":"^6.6.5","babel-plugin-transform-es2015-parameters":"^6.6.5","babel-plugin-transform-es2015-shorthand-properties":"^6.5.0","babel-plugin-transform-es2015-spread":"^6.6.5","babel-plugin-transform-es2015-sticky-regex":"^6.5.0","babel-plugin-transform-es2015-template-literals":"^6.6.5","babel-plugin-transform-es2015-unicode-regex":"^6.5.0","babel-plugin-transform-es3-member-expression-literals":"^6.5.0","babel-plugin-transform-es3-property-literals":"^6.5.0","babel-plugin-transform-object-rest-spread":"^6.8.0","chai":"^3.2.0","cross-env":"^1.0.7","eslint":"^2.0.0","eslint-config-airbnb":"^9.0.0","eslint-plugin-import":"^1.7.0","eslint-plugin-jsx-a11y":"^1.2.0","eslint-plugin-react":"^5.0.0","mocha":"^2.2.5","rimraf":"^2.5.2","webpack":"^1.12.14"},"dependencies":{"flux-standard-action":"^0.6.1"},"gitHead":"69ba288a2f8c51b3ec4675b75df496de82af4a6f","bugs":{"url":"https://github.com/makeomatic/redux-thunk/issues"},"_id":"redux-thunk-fsa@3.0.2","_shasum":"44c8e1eb5f37440d8e438ad107679e2af2fc5603","_from":".","_npmVersion":"3.6.0","_nodeVersion":"5.0.0","_npmUser":{"name":"avvs","email":"v@aminev.me"},"dist":{"shasum":"44c8e1eb5f37440d8e438ad107679e2af2fc5603","tarball":"https://registry.npmjs.org/redux-thunk-fsa/-/redux-thunk-fsa-3.0.2.tgz","integrity":"sha512-x8y5hrb6HJ5Q/5/6BWcou/hoLkYoDCt3V0yUN5xqzGMa+NYs3YNEY5pVghizf2s31ysgTO+rTx1H0/ShK5bgSQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGoU6UyqDt0n+s2+8BdbxNnjzOFp872UPwQyoGouE9WfAiBct69RGZPyVnezzdxzxQqNqxWvynMEQATzIKSiFJ8c4g=="}]},"maintainers":[{"name":"avvs","email":"v@aminev.me"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/redux-thunk-fsa-3.0.2.tgz_1462864677766_0.29683652450330555"},"directories":{}},"3.1.0":{"name":"redux-thunk-fsa","version":"3.1.0","description":"FSA compliant thunk middleware for Redux.","main":"lib/index.js","jsnext:main":"es/index.js","files":["lib","es","src","dist"],"scripts":{"clean":"rimraf lib dist es","build":"npm run build:commonjs && npm run build:umd && npm run build:umd:min && npm run build:es","prepublish":"npm run clean && npm run test && npm run build","posttest":"npm run lint","lint":"eslint src test","test":"cross-env BABEL_ENV=commonjs mocha --compilers js:babel-core/register --reporter spec test/*.js","build:commonjs":"cross-env BABEL_ENV=commonjs babel src --out-dir lib","build:es":"cross-env BABEL_ENV=es babel src --out-dir es","build:umd":"cross-env BABEL_ENV=commonjs NODE_ENV=development webpack","build:umd:min":"cross-env BABEL_ENV=commonjs NODE_ENV=production webpack"},"repository":{"type":"git","url":"git+https://github.com/makeomatic/redux-thunk.git"},"homepage":"https://github.com/makeomatic/redux-thunk","keywords":["redux","thunk","middleware","redux-middleware","flux","fsa"],"author":{"name":"Dan Abramov","email":"dan.abramov@me.com"},"contributors":[{"name":"Vitaly Aminev","email":"v@makeomatic.ru"}],"license":"MIT","devDependencies":{"babel-cli":"^6.6.5","babel-core":"^6.6.5","babel-eslint":"^6.0.0","babel-loader":"^6.2.4","babel-plugin-check-es2015-constants":"^6.6.5","babel-plugin-transform-es2015-arrow-functions":"^6.5.2","babel-plugin-transform-es2015-block-scoped-functions":"^6.6.5","babel-plugin-transform-es2015-block-scoping":"^6.6.5","babel-plugin-transform-es2015-classes":"^6.6.5","babel-plugin-transform-es2015-computed-properties":"^6.6.5","babel-plugin-transform-es2015-destructuring":"^6.6.5","babel-plugin-transform-es2015-for-of":"^6.6.0","babel-plugin-transform-es2015-function-name":"^6.5.0","babel-plugin-transform-es2015-literals":"^6.5.0","babel-plugin-transform-es2015-modules-commonjs":"^6.6.5","babel-plugin-transform-es2015-object-super":"^6.6.5","babel-plugin-transform-es2015-parameters":"^6.6.5","babel-plugin-transform-es2015-shorthand-properties":"^6.5.0","babel-plugin-transform-es2015-spread":"^6.6.5","babel-plugin-transform-es2015-sticky-regex":"^6.5.0","babel-plugin-transform-es2015-template-literals":"^6.6.5","babel-plugin-transform-es2015-unicode-regex":"^6.5.0","babel-plugin-transform-es3-member-expression-literals":"^6.5.0","babel-plugin-transform-es3-property-literals":"^6.5.0","babel-plugin-transform-object-rest-spread":"^6.8.0","chai":"^3.2.0","cross-env":"^1.0.7","eslint":"^2.0.0","eslint-config-airbnb":"^9.0.0","eslint-plugin-import":"^1.7.0","eslint-plugin-jsx-a11y":"^1.2.0","eslint-plugin-react":"^5.0.0","mocha":"^2.2.5","rimraf":"^2.5.2","webpack":"^1.12.14"},"dependencies":{"flux-standard-action":"^0.6.1"},"gitHead":"eb76c98a56c9271147036950a8544e6cb163b0f2","bugs":{"url":"https://github.com/makeomatic/redux-thunk/issues"},"_id":"redux-thunk-fsa@3.1.0","_shasum":"99b09da54dd4deb519f8a51fd7067e69f85595b4","_from":".","_npmVersion":"3.9.5","_nodeVersion":"6.1.0","_npmUser":{"name":"avvs","email":"v@aminev.me"},"dist":{"shasum":"99b09da54dd4deb519f8a51fd7067e69f85595b4","tarball":"https://registry.npmjs.org/redux-thunk-fsa/-/redux-thunk-fsa-3.1.0.tgz","integrity":"sha512-OBYjY108AYOBjDgH3k1O2dpJNEFS1qRrzjNlhBDDVA97ddiI6xhEDosMPcPukB4OX4xoBfZHsZpLaiimW91XXA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDMqv7bPqDESWhNQc2vMwEh1pnlBQ9PWNK5x5nfh96BQQIhAMk0gtoliKxrKL0ZKVTwVbwhY1dWztZhcFKMcJUxxNpE"}]},"maintainers":[{"name":"avvs","email":"v@aminev.me"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/redux-thunk-fsa-3.1.0.tgz_1469628044632_0.957134505501017"},"directories":{}},"4.0.0":{"name":"redux-thunk-fsa","version":"4.0.0","description":"FSA compliant thunk middleware for Redux.","main":"lib/index.js","jsnext:main":"es/index.js","files":["lib","es","src","dist"],"scripts":{"clean":"rimraf lib dist es","build":"npm run build:commonjs && npm run build:umd && npm run build:umd:min && npm run build:es","prepublish":"npm run clean && npm run test && npm run build","posttest":"npm run lint","lint":"eslint src test","test":"cross-env BABEL_ENV=commonjs mocha --compilers js:babel-core/register --reporter spec test/*.js","build:commonjs":"cross-env BABEL_ENV=commonjs babel src --out-dir lib","build:es":"cross-env BABEL_ENV=es babel src --out-dir es","build:umd":"cross-env BABEL_ENV=commonjs NODE_ENV=development webpack","build:umd:min":"cross-env BABEL_ENV=commonjs NODE_ENV=production webpack"},"repository":{"type":"git","url":"git+https://github.com/makeomatic/redux-thunk.git"},"homepage":"https://github.com/makeomatic/redux-thunk","keywords":["redux","thunk","middleware","redux-middleware","flux","fsa"],"author":{"name":"Dan Abramov","email":"dan.abramov@me.com"},"contributors":[{"name":"Vitaly Aminev","email":"v@makeomatic.ru"}],"license":"MIT","devDependencies":{"babel-cli":"^6.14.0","babel-core":"^6.14.0","babel-eslint":"^6.1.2","babel-loader":"^6.2.5","babel-plugin-check-es2015-constants":"^6.6.5","babel-plugin-transform-es2015-arrow-functions":"^6.5.2","babel-plugin-transform-es2015-block-scoped-functions":"^6.6.5","babel-plugin-transform-es2015-block-scoping":"^6.15.0","babel-plugin-transform-es2015-classes":"^6.14.0","babel-plugin-transform-es2015-computed-properties":"^6.6.5","babel-plugin-transform-es2015-destructuring":"^6.9.0","babel-plugin-transform-es2015-for-of":"^6.6.0","babel-plugin-transform-es2015-function-name":"^6.9.0","babel-plugin-transform-es2015-literals":"^6.5.0","babel-plugin-transform-es2015-modules-commonjs":"^6.14.0","babel-plugin-transform-es2015-object-super":"^6.6.5","babel-plugin-transform-es2015-parameters":"^6.11.4","babel-plugin-transform-es2015-shorthand-properties":"^6.5.0","babel-plugin-transform-es2015-spread":"^6.6.5","babel-plugin-transform-es2015-sticky-regex":"^6.5.0","babel-plugin-transform-es2015-template-literals":"^6.6.5","babel-plugin-transform-es2015-unicode-regex":"^6.11.0","babel-plugin-transform-es3-member-expression-literals":"^6.5.0","babel-plugin-transform-es3-property-literals":"^6.5.0","babel-plugin-transform-object-rest-spread":"^6.8.0","chai":"^3.2.0","cross-env":"^3.0.0","eslint":"^3.6.0","eslint-config-airbnb":"^12.0.0","eslint-plugin-import":"^1.16.0","eslint-plugin-jsx-a11y":"^2.2.2","eslint-plugin-react":"^6.3.0","mocha":"^3.0.2","rimraf":"^2.5.4","webpack":"^1.13.2"},"dependencies":{"flux-standard-action":"^0.6.1"},"gitHead":"9f8285d7e15b516b1c178ef6aa005078c0c77279","bugs":{"url":"https://github.com/makeomatic/redux-thunk/issues"},"_id":"redux-thunk-fsa@4.0.0","_shasum":"5a13ce925a9071fbac3b1202716f9b41af21fc09","_from":".","_npmVersion":"3.10.6","_nodeVersion":"6.3.1","_npmUser":{"name":"avvs","email":"v@aminev.me"},"dist":{"shasum":"5a13ce925a9071fbac3b1202716f9b41af21fc09","tarball":"https://registry.npmjs.org/redux-thunk-fsa/-/redux-thunk-fsa-4.0.0.tgz","integrity":"sha512-shbMpuI+szjyknsTOMG8F4az3jDcXm6Au57r5K5eUAm31aARHPt1Ke1iZEeyOcWqYt0Vn/yDGEn6gPMTKBxBFA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID02Ej/vZL74MOpcU/YORtcuztA+yVchqzRP3H+N8dYbAiAykEtDp7rPlvSC/2jKvLZV6lHEvFX2+tkrZO4C9kNTpQ=="}]},"maintainers":[{"name":"avvs","email":"v@aminev.me"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/redux-thunk-fsa-4.0.0.tgz_1474896260700_0.6075421064160764"},"directories":{}},"4.0.1":{"name":"redux-thunk-fsa","version":"4.0.1","description":"FSA compliant thunk middleware for Redux.","main":"lib/index.js","jsnext:main":"es/index.js","files":["lib","es","src","dist"],"scripts":{"clean":"rimraf lib dist es","build":"npm run build:commonjs && npm run build:umd && npm run build:umd:min && npm run build:es","prepublish":"npm run clean && npm run test && npm run build","posttest":"npm run lint","lint":"eslint src test","test":"cross-env BABEL_ENV=commonjs mocha --compilers js:babel-core/register --reporter spec test/*.js","build:commonjs":"cross-env BABEL_ENV=commonjs babel src --out-dir lib","build:es":"cross-env BABEL_ENV=es babel src --out-dir es","build:umd":"cross-env BABEL_ENV=commonjs NODE_ENV=development webpack","build:umd:min":"cross-env BABEL_ENV=commonjs NODE_ENV=production webpack"},"repository":{"type":"git","url":"git+https://github.com/makeomatic/redux-thunk.git"},"homepage":"https://github.com/makeomatic/redux-thunk","keywords":["redux","thunk","middleware","redux-middleware","flux","fsa"],"author":{"name":"Dan Abramov","email":"dan.abramov@me.com"},"contributors":[{"name":"Vitaly Aminev","email":"v@makeomatic.ru"}],"license":"MIT","devDependencies":{"babel-cli":"^6.14.0","babel-core":"^6.14.0","babel-eslint":"^6.1.2","babel-loader":"^6.2.5","babel-plugin-check-es2015-constants":"^6.6.5","babel-plugin-transform-es2015-arrow-functions":"^6.5.2","babel-plugin-transform-es2015-block-scoped-functions":"^6.6.5","babel-plugin-transform-es2015-block-scoping":"^6.15.0","babel-plugin-transform-es2015-classes":"^6.14.0","babel-plugin-transform-es2015-computed-properties":"^6.6.5","babel-plugin-transform-es2015-destructuring":"^6.9.0","babel-plugin-transform-es2015-for-of":"^6.6.0","babel-plugin-transform-es2015-function-name":"^6.9.0","babel-plugin-transform-es2015-literals":"^6.5.0","babel-plugin-transform-es2015-modules-commonjs":"^6.14.0","babel-plugin-transform-es2015-object-super":"^6.6.5","babel-plugin-transform-es2015-parameters":"^6.11.4","babel-plugin-transform-es2015-shorthand-properties":"^6.5.0","babel-plugin-transform-es2015-spread":"^6.6.5","babel-plugin-transform-es2015-sticky-regex":"^6.5.0","babel-plugin-transform-es2015-template-literals":"^6.6.5","babel-plugin-transform-es2015-unicode-regex":"^6.11.0","babel-plugin-transform-es3-member-expression-literals":"^6.5.0","babel-plugin-transform-es3-property-literals":"^6.5.0","babel-plugin-transform-object-rest-spread":"^6.8.0","chai":"^3.2.0","cross-env":"^3.0.0","eslint":"^3.6.0","eslint-config-airbnb":"^12.0.0","eslint-plugin-import":"^1.16.0","eslint-plugin-jsx-a11y":"^2.2.2","eslint-plugin-react":"^6.3.0","mocha":"^3.0.2","rimraf":"^2.5.4","webpack":"^1.13.2"},"dependencies":{"flux-standard-action":"^0.6.1"},"gitHead":"06212c646efddcae786ebd6a901134fcb14f0567","bugs":{"url":"https://github.com/makeomatic/redux-thunk/issues"},"_id":"redux-thunk-fsa@4.0.1","_shasum":"84bb129fb4322bdbafe55a1c2138839309be979d","_from":".","_npmVersion":"3.10.6","_nodeVersion":"6.3.1","_npmUser":{"name":"avvs","email":"v@aminev.me"},"dist":{"shasum":"84bb129fb4322bdbafe55a1c2138839309be979d","tarball":"https://registry.npmjs.org/redux-thunk-fsa/-/redux-thunk-fsa-4.0.1.tgz","integrity":"sha512-adKeqLxnMQX/Gh6yMT6QcSUGHrmaTzhVo4Etn1qlQkqeYCA70oXVtn/64ODtORQqiDkoQKpiHXskoJy8ZYtnEg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCt910kY/Eue6TyfsMUCQ2kyzZFwa6gHsaipB19m05qqgIhAJdjjeSDElXYBdQNXMGZNZOEFXpOcHFwNuor7t0D3040"}]},"maintainers":[{"name":"avvs","email":"v@aminev.me"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/redux-thunk-fsa-4.0.1.tgz_1475141337286_0.35194937884807587"},"directories":{}},"4.1.0":{"name":"redux-thunk-fsa","version":"4.1.0","description":"FSA compliant thunk middleware for Redux.","main":"lib/index.js","module":"es/index.js","types":"src/index.d.ts","sideEffects":false,"scripts":{"clean":"rimraf lib dist es","prepare":"npm run clean && npm run lint && npm run test && npm run build","lint":"eslint src test","test":"cross-env BABEL_ENV=commonjs mocha --require @babel/register --reporter spec test/*.js","build":"npm run build:commonjs && npm run build:umd && npm run build:umd:min && npm run build:es","build:commonjs":"cross-env BABEL_ENV=commonjs babel src --out-dir lib","build:es":"cross-env BABEL_ENV=es babel src --out-dir es","build:umd":"cross-env BABEL_ENV=commonjs NODE_ENV=development npx webpack","build:umd:min":"cross-env BABEL_ENV=commonjs NODE_ENV=production npx webpack"},"repository":{"type":"git","url":"https://github.com/makeomatic/redux-thunk.git"},"homepage":"https://github.com/makeomatic/redux-thunk","keywords":["redux","thunk","middleware","redux-middleware","flux","fsa"],"author":{"name":"Dan Abramov","email":"dan.abramov@me.com"},"contributors":[{"name":"Vitaly Aminev","email":"v@makeomatic.ru"}],"license":"MIT","devDependencies":{"@babel/cli":"^7.5.5","@babel/core":"^7.5.5","@babel/preset-env":"^7.5.5","@babel/register":"^7.5.5","@typescript-eslint/eslint-plugin":"^4.4.1","@typescript-eslint/parser":"^4.4.1","babel-loader":"^8.1.0","chai":"^4.2.0","cross-env":"^7.0.2","eslint":"^7.11.0","eslint-config-makeomatic":"^5.0.3","eslint-plugin-import":"^2.22.1","eslint-plugin-unicorn":"^22.0.0","husky":"^4.3.0","lint-staged":"^10.4.0","mocha":"^8.1.3","prettier":"^2.1.2","redux":"^4","rimraf":"^3.0.0","typescript":"^4.0.3","typings-tester":"^0.3.2","webpack":"^4.39.3","webpack-cli":"^3.3.7"},"licenseText":"The MIT License (MIT)\n\nCopyright (c) 2015-present Dan Abramov\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"redux-thunk-fsa@4.1.0","dist":{"shasum":"6a2fce734b91b025f80fd6008df21e01bb8a962d","integrity":"sha512-5lqYMOI2gEH7p5cyOfan5RSfyIhb4hZYSAQKBhHOZ0jw092Xl9n7qbPn3fI8fKidNTPoDUN/aFcpx08n3GSZNg==","tarball":"https://registry.npmjs.org/redux-thunk-fsa/-/redux-thunk-fsa-4.1.0.tgz","fileCount":14,"unpackedSize":37862,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfh7hCCRA9TVsSAnZWagAAgcMP/iVEda1UbcghkY6qn6H2\nxdvnAKM7NpH4u7Sf/MIHaYH/s0QeA0UjcpLy8cDD0Ed5QpSzJYXjIHHlRXqL\ndsiJa0xRiY6/J/RinbQ87pjtevJ7Zt7gNV2/jPgFuyIz1i2VjfmBrTWRRsza\ndFEGp+R9n1ePMwUA4nO3Srci5mBc/1n87WC2tSMeUE2DwrtUMHPPgiofebdy\nRZ+n5dsHyil+z0Gvp3GbzcImt4poeySEzcx+YB1PgZF4oeg7QQr2PkNWOnBb\nVMmmYRB6I8ZrcmZ6PonX3T4AAoOfUJkK2MWftwUlJ5SJakXeaQH6GoTCM8+a\nM5J/SX0P6cw8rEVWVLYHaHp4SKunf5fmHSub3EKX4zuhXFSAkrO+6qMVikm9\n4teJG5MCV2nsfOPmTsedU7BSjRCkKC3wC20NACnkh9St+ZnCILfS+nIwePc7\n/AJyrYGhQd7S1GnOS9yg7O+lrTbXW1MqGAiGFBCAVJZAW9ThXMImZiKLBOUb\naHTV1QDYFto+ZxeCiXSXjnIUdW0o1qGrLtSvD3gQDQX3hg/+P2hCEpSUSjVF\nLsa832YGLZYD6jCuhdZye+nKyAOULRvfccpAPa727LpUnjbWh6GBFKTawVR7\nDH2a4mvxu2T8rwTFZBpsO0UhKqTnUvRKSwfXACl8wit7vmPh+4pIwoPfxNKs\naWqD\r\n=/TIk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH+o5UAqxexdeN/XzjcVq2QEKAscJaIJ51Z151C3a5z4AiB5kofaeM++Ldy87uOUm8iSE98gt2WhpN2mXSECEpLNYQ=="}]},"maintainers":[{"name":"avvs","email":"v@aminev.me"}],"_npmUser":{"name":"avvs","email":"v@aminev.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-thunk-fsa_4.1.0_1602730050511_0.663943801877293"},"_hasShrinkwrap":false},"4.1.1":{"name":"redux-thunk-fsa","version":"4.1.1","description":"FSA compliant thunk middleware for Redux.","main":"lib/index.js","module":"es/index.js","types":"src/index.d.ts","sideEffects":false,"scripts":{"clean":"rimraf lib dist es","prepare":"npm run clean && npm run lint && npm run test && npm run build","lint":"eslint src test","test":"cross-env BABEL_ENV=commonjs mocha --require @babel/register --reporter spec test/*.js","build":"npm run build:commonjs && npm run build:umd && npm run build:umd:min && npm run build:es","build:commonjs":"cross-env BABEL_ENV=commonjs babel src --out-dir lib","build:es":"cross-env BABEL_ENV=es babel src --out-dir es","build:umd":"cross-env BABEL_ENV=commonjs NODE_ENV=development npx webpack","build:umd:min":"cross-env BABEL_ENV=commonjs NODE_ENV=production npx webpack"},"repository":{"type":"git","url":"https://github.com/makeomatic/redux-thunk.git"},"homepage":"https://github.com/makeomatic/redux-thunk","keywords":["redux","thunk","middleware","redux-middleware","flux","fsa"],"author":{"name":"Dan Abramov","email":"dan.abramov@me.com"},"contributors":[{"name":"Vitaly Aminev","email":"v@makeomatic.ru"}],"license":"MIT","devDependencies":{"@babel/cli":"^7.5.5","@babel/core":"^7.5.5","@babel/preset-env":"^7.5.5","@babel/register":"^7.5.5","@typescript-eslint/eslint-plugin":"^4.4.1","@typescript-eslint/parser":"^4.4.1","babel-loader":"^8.1.0","chai":"^4.2.0","cross-env":"^7.0.2","eslint":"^7.11.0","eslint-config-makeomatic":"^5.0.3","eslint-plugin-import":"^2.22.1","eslint-plugin-unicorn":"^22.0.0","husky":"^4.3.0","lint-staged":"^10.4.0","mocha":"^8.1.3","prettier":"^2.1.2","redux":"^4","rimraf":"^3.0.0","typescript":"^4.0.3","typings-tester":"^0.3.2","webpack":"^4.39.3","webpack-cli":"^3.3.7"},"licenseText":"The MIT License (MIT)\n\nCopyright (c) 2015-present Dan Abramov\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"redux-thunk-fsa@4.1.1","dist":{"shasum":"9b7479ee77170df4732cd73a58b3dd79a4c6817c","integrity":"sha512-BfzMTIhiHEoiR0LOltaZvKJ2dWp32weAt+DuCdTxGF0f74/aA+ft0cg0YuDa5B01d+CkApXhKN4aQK+WonurPg==","tarball":"https://registry.npmjs.org/redux-thunk-fsa/-/redux-thunk-fsa-4.1.1.tgz","fileCount":14,"unpackedSize":36447,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfh7jqCRA9TVsSAnZWagAACHMP/A3j1TWvXU4TyN69ndxo\neUgZiEwe9hdJqVpvm/ngI8yCgEw1+pSTiZ+qz1CzNLF0xXWSfv6KKTO6LPK1\nUp0EKs5CntklI7+38chU/4s6ct7y4OQCkeDq0SsrnDS+kgDGeAeLRJ5kDAXi\nSjtCOdaZ5M/WboYK+mXHPhFtKd+k7/ZCYoo+fTWw2DYxSmmTtjZc8Gc5oKf0\nglRLNYClLXo7nIFX6S0o9+Jg2EqmEqa2sww8OPmOPBvTAhlBL+ATfv3Az52v\nDaj2KYFgK9gk+xCpBrPdm2io4iDxwa8KWELROOjNKA2KDm8vI+wRLXqrcUSD\n1vOMFa0USBjX89w+QWaZDzW2f41UuMCkN/c63bpE2QnpykRRhFSGhoJH+QM3\neAaQC12Ml5bG41lP0Vrh6kjyxqJhu63iHfNNmXp+1BHiBHifgJc+RFOZyfkM\nx2yKV4+un/8WUyagryLEMq0yYVzxbQ1ml9R7UOV0H8bp2q5pRv2lZwcjmRbx\n6xZbeMDvhMt7pK0h02jpDUqNaAuJMXRHJCsA+y8ux40iecWtO25b7dHjGwBd\nUkl3FFfAjoN9i/Stpm21RePbO6QRs8be7X/f3qaBvbPghJcpCv5V0bSX5NLB\n4EFSsL9Cm86xZDUBl81+qq80uWqhqpXXp9Vi4XfxrahpeR5uyKPFRL2KHDZp\nGQ9z\r\n=R3hI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICZf7t2MpbvD6VTHc1ppiyUutXvczr/tYUkITF5hZLqLAiANkauyv8j+6W+XdOAHXHZ9sbkjMKYHxB3gB/hWkXJUBA=="}]},"maintainers":[{"name":"avvs","email":"v@aminev.me"}],"_npmUser":{"name":"avvs","email":"v@aminev.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-thunk-fsa_4.1.1_1602730217691_0.32571353198661246"},"_hasShrinkwrap":false}},"readme":"Redux Thunk FSA\n\nThunk [middleware](https://redux.js.org/advanced/middleware) for Redux.\n\n[![npm version](https://img.shields.io/npm/v/redux-thunk-fsa.svg?style=flat-square)](https://www.npmjs.com/package/redux-thunk-fsa)\n[![npm downloads](https://img.shields.io/npm/dm/redux-thunk-fsa.svg?style=flat-square)](https://www.npmjs.com/package/redux-thunk-fsa)\n\n```js\nnpm install --save redux-thunk-fsa\n```\n\n## Note on 3.x Update\n\n```diff\n- import ReduxThunk from `redux-thunk`;\n+ import ReduxThunk from `redux-thunk-fsa`;\n```\n\nMost importantly it adds support to FSA compliant actions. Consider the following example:\n\n```js\nconst LOADING = 'INCREMENT/LOADING';\nconst INCREMENT = 'INCREMENT/+';\n\nfunction increment() {\n  return {\n    type: INCREMENT_COUNTER\n  };\n}\n\nfunction loading() {\n  return {\n    type: LOADING\n  };\n}\n\nfunction incrementAsync() {\n  return {\n    type: INCREMENT,\n    payload: dispatch => {\n      // sync increment\n      dispatch(loading());\n      // async increment\n      return Promise.resolve(10);\n    }\n  };\n}\n```\n\nNormally this wouldn't be handled, but in conjunction with https://github.com/acdlite/redux-promise it allows you to create useful\nside-effects without too much hassle. It will eventually call action increment with payload 10 - and at this point you can handle it.\n\n## Why Do I Need This?\n\nWith a plain basic Redux store, you can only do simple synchronous updates by\ndispatching an action. Middleware extends the store's abilities, and lets you\nwrite async logic that interacts with the store.\n\nThunks are the recommended middleware for basic Redux side effects logic,\nincluding complex synchronous logic that needs access to the store, and simple\nasync logic like AJAX requests.\n\nFor more details on why thunks are useful, see:\n\n- **Stack Overflow: Dispatching Redux Actions with a Timeout**  \n  http://stackoverflow.com/questions/35411423/how-to-dispatch-a-redux-action-with-a-timeout/35415559#35415559  \n  Dan Abramov explains the basics of managing async behavior in Redux, walking\n  through a progressive series of approaches (inline async calls, async action\n  creators, thunk middleware).\n\n- **Stack Overflow: Why do we need middleware for async flow in Redux?**  \n  http://stackoverflow.com/questions/34570758/why-do-we-need-middleware-for-async-flow-in-redux/34599594#34599594  \n  Dan Abramov gives reasons for using thunks and async middleware, and some\n  useful patterns for using thunks.\n\n- **What the heck is a \"thunk\"?**  \n  https://daveceddia.com/what-is-a-thunk/  \n  A quick explanation for what the word \"thunk\" means in general, and for Redux\n  specifically.\n\n- **Thunks in Redux: The Basics**  \n  https://medium.com/fullstack-academy/thunks-in-redux-the-basics-85e538a3fe60  \n  A detailed look at what thunks are, what they solve, and how to use them.\n\nYou may also want to read the\n**[Redux FAQ entry on choosing which async middleware to use](https://redux.js.org/faq/actions#what-async-middleware-should-i-use-how-do-you-decide-between-thunks-sagas-observables-or-something-else)**.\n\nWhile the thunk middleware is not directly included with the Redux core library,\nit is used by default in our\n**[`@reduxjs/toolkit` package](https://github.com/reduxjs/redux-toolkit)**.\n\n## Motivation\n\nRedux Thunk [middleware](https://redux.js.org/advanced/middleware)\nallows you to write action creators that return a function instead of an action.\nThe thunk can be used to delay the dispatch of an action, or to dispatch only if\na certain condition is met. The inner function receives the store methods\n`dispatch` and `getState` as parameters.\n\nAn action creator that returns a function to perform asynchronous dispatch:\n\n```js\nconst INCREMENT_COUNTER = 'INCREMENT_COUNTER';\n\nfunction increment() {\n  return {\n    type: INCREMENT_COUNTER,\n  };\n}\n\nfunction incrementAsync() {\n  return (dispatch) => {\n    setTimeout(() => {\n      // Yay! Can invoke sync or async actions with `dispatch`\n      dispatch(increment());\n    }, 1000);\n  };\n}\n```\n\nAn action creator that returns a function to perform conditional dispatch:\n\n```js\nfunction incrementIfOdd() {\n  return (dispatch, getState) => {\n    const { counter } = getState();\n\n    if (counter % 2 === 0) {\n      return;\n    }\n\n    dispatch(increment());\n  };\n}\n```\n\n## What’s a thunk?!\n\nA [thunk](https://en.wikipedia.org/wiki/Thunk) is a function that wraps an\nexpression to delay its evaluation.\n\n```js\n// calculation of 1 + 2 is immediate\n// x === 3\nlet x = 1 + 2;\n\n// calculation of 1 + 2 is delayed\n// foo can be called later to perform the calculation\n// foo is a thunk!\nlet foo = () => 1 + 2;\n```\n\nThe term [originated](https://en.wikipedia.org/wiki/Thunk#cite_note-1) as a\nhumorous past-tense version of \"think\".\n\n## Installation\n\n```\nnpm install --save redux-thunk-fsa\n```\n\nThen, to enable Redux Thunk, use\n[`applyMiddleware()`](https://redux.js.org/api/applymiddleware):\n\n```js\nimport { createStore, applyMiddleware } from 'redux';\nimport thunk from 'redux-thunk';\nimport rootReducer from './reducers/index';\n\n// Note: this API requires redux@>=3.1.0\nconst store = createStore(rootReducer, applyMiddleware(thunk));\n```\n\n## Composition\n\nAny return value from the inner function will be available as the return value\nof `dispatch` itself. This is convenient for orchestrating an asynchronous\ncontrol flow with thunk action creators dispatching each other and returning\nPromises to wait for each other’s completion:\n\n```js\nimport { createStore, applyMiddleware } from 'redux';\nimport thunk from 'redux-thunk-fsa';\nimport rootReducer from './reducers';\n\n// Note: this API requires redux@>=3.1.0\nconst store = createStore(rootReducer, applyMiddleware(thunk));\n\nfunction fetchSecretSauce() {\n  return fetch('https://www.google.com/search?q=secret+sauce');\n}\n\n// These are the normal action creators you have seen so far.\n// The actions they return can be dispatched without any middleware.\n// However, they only express “facts” and not the “async flow”.\n\nfunction makeASandwich(forPerson, secretSauce) {\n  return {\n    type: 'MAKE_SANDWICH',\n    forPerson,\n    secretSauce,\n  };\n}\n\nfunction apologize(fromPerson, toPerson, error) {\n  return {\n    type: 'APOLOGIZE',\n    fromPerson,\n    toPerson,\n    error,\n  };\n}\n\nfunction withdrawMoney(amount) {\n  return {\n    type: 'WITHDRAW',\n    amount,\n  };\n}\n\n// Even without middleware, you can dispatch an action:\nstore.dispatch(withdrawMoney(100));\n\n// But what do you do when you need to start an asynchronous action,\n// such as an API call, or a router transition?\n\n// Meet thunks.\n// A thunk in this context is a function that can be dispatched to perform async\n// activity and can dispatch actions and read state.\n// This is an action creator that returns a thunk:\nfunction makeASandwichWithSecretSauce(forPerson) {\n  // We can invert control here by returning a function - the \"thunk\".\n  // When this function is passed to `dispatch`, the thunk middleware will intercept it,\n  // and call it with `dispatch` and `getState` as arguments.\n  // This gives the thunk function the ability to run some logic, and still interact with the store.\n  return function(dispatch) {\n    return fetchSecretSauce().then(\n      (sauce) => dispatch(makeASandwich(forPerson, sauce)),\n      (error) => dispatch(apologize('The Sandwich Shop', forPerson, error)),\n    );\n  };\n}\n\n// Thunk middleware lets me dispatch thunk async actions\n// as if they were actions!\n\nstore.dispatch(makeASandwichWithSecretSauce('Me'));\n\n// It even takes care to return the thunk’s return value\n// from the dispatch, so I can chain Promises as long as I return them.\n\nstore.dispatch(makeASandwichWithSecretSauce('My partner')).then(() => {\n  console.log('Done!');\n});\n\n// In fact I can write action creators that dispatch\n// actions and async actions from other action creators,\n// and I can build my control flow with Promises.\n\nfunction makeSandwichesForEverybody() {\n  return function(dispatch, getState) {\n    if (!getState().sandwiches.isShopOpen) {\n      // You don’t have to return Promises, but it’s a handy convention\n      // so the caller can always call .then() on async dispatch result.\n\n      return Promise.resolve();\n    }\n\n    // We can dispatch both plain object actions and other thunks,\n    // which lets us compose the asynchronous actions in a single flow.\n\n    return dispatch(makeASandwichWithSecretSauce('My Grandma'))\n      .then(() =>\n        Promise.all([\n          dispatch(makeASandwichWithSecretSauce('Me')),\n          dispatch(makeASandwichWithSecretSauce('My wife')),\n        ]),\n      )\n      .then(() => dispatch(makeASandwichWithSecretSauce('Our kids')))\n      .then(() =>\n        dispatch(\n          getState().myMoney > 42\n            ? withdrawMoney(42)\n            : apologize('Me', 'The Sandwich Shop'),\n        ),\n      );\n  };\n}\n\n// This is very useful for server side rendering, because I can wait\n// until data is available, then synchronously render the app.\n\nstore\n  .dispatch(makeSandwichesForEverybody())\n  .then(() =>\n    response.send(ReactDOMServer.renderToString(<MyApp store={store} />)),\n  );\n\n// I can also dispatch a thunk async action from a component\n// any time its props change to load the missing data.\n\nimport { connect } from 'react-redux';\nimport { Component } from 'react';\n\nclass SandwichShop extends Component {\n  componentDidMount() {\n    this.props.dispatch(makeASandwichWithSecretSauce(this.props.forPerson));\n  }\n\n  componentDidUpdate(prevProps) {\n    if (prevProps.forPerson !== this.props.forPerson) {\n      this.props.dispatch(makeASandwichWithSecretSauce(this.props.forPerson));\n    }\n  }\n\n  render() {\n    return <p>{this.props.sandwiches.join('mustard')}</p>;\n  }\n}\n\nexport default connect((state) => ({\n  sandwiches: state.sandwiches,\n}))(SandwichShop);\n```\n\n## Injecting a Custom Argument\n\nSince 2.1.0, Redux Thunk supports injecting a custom argument using the\n`withExtraArgument` function:\n\n```js\nconst store = createStore(\n  reducer,\n  applyMiddleware(thunk.withExtraArgument(api)),\n);\n\n// later\nfunction fetchUser(id) {\n  return (dispatch, getState, api) => {\n    // you can use api here\n  };\n}\n```\n\nTo pass multiple things, just wrap them in a single object. \nUsing ES2015 shorthand property names can make this more concise.\n\n```js\nconst api = \"http://www.example.com/sandwiches/\";\nconst whatever = 42;\n\nconst store = createStore(\n  reducer,\n  applyMiddleware(thunk.withExtraArgument({ api, whatever })),\n);\n\n// later\nfunction fetchUser(id) {\n  return (dispatch, getState, { api, whatever }) => {\n    // you can use api and something else here\n  };\n}\n```\n\n## License\n\nMIT\n","maintainers":[{"name":"avvs","email":"v@aminev.me"}],"time":{"modified":"2022-06-26T10:30:23.435Z","created":"2016-05-10T07:08:06.232Z","3.0.0":"2016-05-10T07:08:06.232Z","3.0.1":"2016-05-10T07:15:38.180Z","3.0.2":"2016-05-10T07:17:58.228Z","3.1.0":"2016-07-27T14:00:47.330Z","4.0.0":"2016-09-26T13:24:22.816Z","4.0.1":"2016-09-29T09:28:59.093Z","4.1.0":"2020-10-15T02:47:30.661Z","4.1.1":"2020-10-15T02:50:17.972Z"},"homepage":"https://github.com/makeomatic/redux-thunk","keywords":["redux","thunk","middleware","redux-middleware","flux","fsa"],"repository":{"type":"git","url":"https://github.com/makeomatic/redux-thunk.git"},"contributors":[{"name":"Vitaly Aminev","email":"v@makeomatic.ru"}],"author":{"name":"Dan Abramov","email":"dan.abramov@me.com"},"license":"MIT","readmeFilename":"README.md"}