{"_id":"redux-recycle","_rev":"11-90395852019fa3f6295c6cb67f979322","name":"redux-recycle","description":"higher-order reducer to reset the redux state on certain actions","dist-tags":{"latest":"1.4.0"},"versions":{"1.0.0":{"name":"redux-recycle","version":"1.0.0","description":"higher-order reducer to reset the redux state on certain actions","main":"lib/index.js","scripts":{"clean":"rimraf lib","build":"babel src --out-dir lib","lint":"eslint src test","test":"NODE_ENV=test mocha --compilers js:babel/register --recursive","test:watch":"NODE_ENV=test mocha --compilers js:babel/register --recursive --watch","test:cov":"babel-node ./node_modules/.bin/isparta cover ./node_modules/.bin/_mocha -- --recursive","prepublish":"npm run lint && npm run test && npm run clean && npm run build"},"repository":{"type":"git","url":"git+https://github.com/omnidan/redux-recycle.git"},"keywords":["redux","undo","redo","flux","time travel"],"author":{"name":"Daniel Bugl","email":"me@omnidan.net","url":"https://github.com/omnidan"},"license":"MIT","bugs":{"url":"https://github.com/omnidan/redux-recycle/issues"},"homepage":"https://github.com/omnidan/redux-recycle","devDependencies":{"babel":"^5.8.23","babel-core":"^5.8.25","babel-eslint":"^4.1.3","babel-loader":"^5.3.2","eslint":"^1.7","eslint-config-standard":"^4.4.0","eslint-plugin-react":"^3.6.0","eslint-plugin-standard":"^1.3.1","expect":"^1.12.2","isparta":"^3.1.0","mocha":"^2.3.3","rimraf":"^2.4.3"},"dependencies":{"redux":"^3.0.2"},"gitHead":"fa31a01af1161f45f218a0b425faff1c82f52fd8","_id":"redux-recycle@1.0.0","_shasum":"913e8c9502cd5efc532d65c9808a105d804f5947","_from":".","_npmVersion":"2.14.4","_nodeVersion":"4.1.0","_npmUser":{"name":"omnidan","email":"daniel.bugl@touchlay.com"},"maintainers":[{"name":"omnidan","email":"daniel.bugl@touchlay.com"}],"dist":{"shasum":"913e8c9502cd5efc532d65c9808a105d804f5947","tarball":"https://registry.npmjs.org/redux-recycle/-/redux-recycle-1.0.0.tgz","integrity":"sha512-XBsqR2rQZpHLHA4T9+74QRup8HMQilGRx5f2fT7/eoePlcJMcZQteArH873iRbbG6POv44FYpo3FVhtLdhXTxw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBYtBoisNncASDngqaDCbOLLYhJuqupqdOB1cCYdSFAbAiAPKhD2IP+0KZJR3OuWWXt8ElqXHNPVpdfKfgtmWsNsag=="}]}},"1.0.1":{"name":"redux-recycle","version":"1.0.1","description":"higher-order reducer to reset the redux state on certain actions","main":"lib/index.js","scripts":{"clean":"rimraf lib","build":"babel src --out-dir lib","lint":"eslint src test","test":"NODE_ENV=test mocha --compilers js:babel/register --recursive","test:watch":"NODE_ENV=test mocha --compilers js:babel/register --recursive --watch","test:cov":"babel-node ./node_modules/.bin/isparta cover ./node_modules/.bin/_mocha -- --recursive","prepublish":"npm run lint && npm run test && npm run clean && npm run build"},"repository":{"type":"git","url":"git+https://github.com/omnidan/redux-recycle.git"},"keywords":["redux","undo","redo","flux","time travel"],"author":{"name":"Daniel Bugl","email":"me@omnidan.net","url":"https://github.com/omnidan"},"license":"MIT","bugs":{"url":"https://github.com/omnidan/redux-recycle/issues"},"homepage":"https://github.com/omnidan/redux-recycle","devDependencies":{"babel":"^5.8.23","babel-core":"^5.8.25","babel-eslint":"^4.1.3","babel-loader":"^5.3.2","chai":"^3.4.1","eslint":"^1.7","eslint-config-standard":"^4.4.0","eslint-plugin-react":"^3.6.0","eslint-plugin-standard":"^1.3.1","expect":"^1.12.2","isparta":"^3.1.0","mocha":"^2.3.3","rimraf":"^2.4.3"},"dependencies":{"redux":"^3.0.2"},"gitHead":"1028d85ddd990f3d970885b666000b4c0b105c08","_id":"redux-recycle@1.0.1","_shasum":"a9f1af17ea0255f6ff8996037d3c5f78b9ae7762","_from":".","_npmVersion":"3.3.9","_nodeVersion":"5.0.0","_npmUser":{"name":"omnidan","email":"daniel.bugl@touchlay.com"},"maintainers":[{"name":"omnidan","email":"daniel.bugl@touchlay.com"}],"dist":{"shasum":"a9f1af17ea0255f6ff8996037d3c5f78b9ae7762","tarball":"https://registry.npmjs.org/redux-recycle/-/redux-recycle-1.0.1.tgz","integrity":"sha512-QDuWzvIoAXj/vr04tkAp6/6H6OQpaeJvol+tDO9KD6baUv3XO9bybVQWgEuIZqi0EXY6qo1AdnylyW8N9j4ZyA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAXzwI68oRq5s269PDI58aIfrrcbdRaUbIJOuImp+zM2AiEAiYgLqvhkj4aSpWeeJoqNp6ImDiAJRm8EQrtsuh9Ffuo="}]}},"1.1.0":{"name":"redux-recycle","version":"1.1.0","description":"higher-order reducer to reset the redux state on certain actions","main":"lib/index.js","scripts":{"clean":"rimraf lib","build":"babel src --out-dir lib","lint":"eslint src test","test":"NODE_ENV=test mocha --compilers js:babel/register --recursive","test:watch":"NODE_ENV=test mocha --compilers js:babel/register --recursive --watch","test:cov":"babel-node ./node_modules/.bin/isparta cover ./node_modules/.bin/_mocha -- --recursive","prepublish":"npm run lint && npm run test && npm run clean && npm run build"},"repository":{"type":"git","url":"git+https://github.com/omnidan/redux-recycle.git"},"keywords":["redux","undo","redo","flux","time travel"],"author":{"name":"Daniel Bugl","email":"me@omnidan.net","url":"https://github.com/omnidan"},"license":"MIT","bugs":{"url":"https://github.com/omnidan/redux-recycle/issues"},"homepage":"https://github.com/omnidan/redux-recycle","devDependencies":{"babel":"^5.8.23","babel-core":"^5.8.25","babel-eslint":"^4.1.3","babel-loader":"^5.3.2","chai":"^3.4.1","eslint":"^1.7","eslint-config-standard":"^4.4.0","eslint-plugin-react":"^3.6.0","eslint-plugin-standard":"^1.3.1","expect":"^1.12.2","isparta":"^3.1.0","mocha":"^2.3.3","rimraf":"^2.4.3"},"dependencies":{"redux":"^3.0.2"},"gitHead":"14673c0abe9fd80b82810d45aace6ca11e5f7d79","_id":"redux-recycle@1.1.0","_shasum":"3422ae0414594d24f6051dab68c9c1b1d4f9a1e7","_from":".","_npmVersion":"3.6.0","_nodeVersion":"5.6.0","_npmUser":{"name":"omnidan","email":"me@omnidan.net"},"dist":{"shasum":"3422ae0414594d24f6051dab68c9c1b1d4f9a1e7","tarball":"https://registry.npmjs.org/redux-recycle/-/redux-recycle-1.1.0.tgz","integrity":"sha512-U6f+3QLUpgSkBqXlixJkm9TRsPdiQKgtLKjsLan3rLff969H5eOp0zr4AiEQSYRzOXIyB7lmcB2zyEEMu2h4Xw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFdvVy42EgPyxCFu8rcP18kjAGThik+yl4+O0NR5x+GXAiACuGJSmQ890k8q0fKAtohDhJjlu3XlAYPXOIo0AFTDlg=="}]},"maintainers":[{"name":"omnidan","email":"daniel.bugl@touchlay.com"}],"_npmOperationalInternal":{"host":"packages-6-west.internal.npmjs.com","tmp":"tmp/redux-recycle-1.1.0.tgz_1455992692033_0.9558961666189134"}},"1.1.1":{"name":"redux-recycle","version":"1.1.1","description":"higher-order reducer to reset the redux state on certain actions","main":"lib/index.js","scripts":{"clean":"rimraf lib","build":"babel src --out-dir lib","lint":"eslint src test","test":"NODE_ENV=test ./node_modules/.bin/mocha --compilers js:babel-core/register --recursive","test:watch":"NODE_ENV=test ./node_modules/.bin/mocha --compilers js:babel-core/register --recursive --watch","test:cov":"babel-node ./node_modules/.bin/isparta cover ./node_modules/.bin/_mocha -- --recursive","prepublish":"npm run lint && npm run test && npm run clean && npm run build"},"repository":{"type":"git","url":"git+https://github.com/omnidan/redux-recycle.git"},"keywords":["redux","flux","recycle","state","higher-order reducer","hor"],"author":{"name":"Daniel Bugl","email":"me@omnidan.net","url":"https://github.com/omnidan"},"license":"MIT","bugs":{"url":"https://github.com/omnidan/redux-recycle/issues"},"homepage":"https://github.com/omnidan/redux-recycle","devDependencies":{"babel-cli":"^6.5.1","babel-core":"^6.5.2","babel-eslint":"^5.0.0","babel-preset-es2015":"^6.5.0","chai":"^3.5.0","eslint":"^2.2","eslint-config-standard":"^5.1.0","eslint-plugin-promise":"^1.0.8","eslint-plugin-react":"^4.0.0","eslint-plugin-standard":"^1.3.2","expect":"^1.14.0","isparta":"^4.0.0","mocha":"^2.4.5","rimraf":"^2.5.2"},"dependencies":{"redux":"^3.3.1"},"gitHead":"efa8f8004c04f19469d0961d430367f88ebeda05","_id":"redux-recycle@1.1.1","_shasum":"cb6b029110e0c32a0485db970aec229dce994495","_from":".","_npmVersion":"3.6.0","_nodeVersion":"5.6.0","_npmUser":{"name":"omnidan","email":"me@omnidan.net"},"dist":{"shasum":"cb6b029110e0c32a0485db970aec229dce994495","tarball":"https://registry.npmjs.org/redux-recycle/-/redux-recycle-1.1.1.tgz","integrity":"sha512-/MdPL9oBPcNjLfDXUOOLakPXiOWuu1W7fmSjm1pW6atSqID0fOAZZ6E3Ek99pgQD04gp2WSTFyhx32LdEhhEdg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGf80M6+5bCbm5gG3xdOkAZNrozmSrIwu4s353bYwMM7AiA/MTuEdFeU+ibbLf8/9V9pdl7SjrRlTBrLN269o5qeMg=="}]},"maintainers":[{"name":"omnidan","email":"daniel.bugl@touchlay.com"}],"_npmOperationalInternal":{"host":"packages-6-west.internal.npmjs.com","tmp":"tmp/redux-recycle-1.1.1.tgz_1456173694436_0.3622525464743376"}},"1.1.2":{"name":"redux-recycle","version":"1.1.2","description":"higher-order reducer to reset the redux state on certain actions","main":"lib/index.js","scripts":{"clean":"rimraf lib","build":"babel src --out-dir lib","lint":"eslint src test","test":"NODE_ENV=test ./node_modules/.bin/mocha --compilers js:babel-core/register --recursive","test:watch":"NODE_ENV=test ./node_modules/.bin/mocha --compilers js:babel-core/register --recursive --watch","test:cov":"babel-node ./node_modules/.bin/isparta cover ./node_modules/.bin/_mocha -- --recursive","prepublish":"npm run lint && npm run test && npm run clean && npm run build"},"repository":{"type":"git","url":"git+https://github.com/omnidan/redux-recycle.git"},"keywords":["redux","flux","recycle","state","higher-order reducer","hor"],"author":{"name":"Daniel Bugl","email":"me@omnidan.net","url":"https://github.com/omnidan"},"license":"MIT","bugs":{"url":"https://github.com/omnidan/redux-recycle/issues"},"homepage":"https://github.com/omnidan/redux-recycle","devDependencies":{"babel-cli":"^6.5.1","babel-core":"^6.5.2","babel-eslint":"^5.0.0","babel-plugin-transform-object-rest-spread":"^6.5.0","babel-preset-es2015":"^6.5.0","chai":"^3.5.0","eslint":"^2.2.0","eslint-config-standard":"^5.1.0","eslint-plugin-promise":"^1.0.8","eslint-plugin-standard":"^1.3.2","expect":"^1.14.0","isparta":"^4.0.0","mocha":"^2.4.5","rimraf":"^2.5.2"},"dependencies":{"redux":"^3.3.1"},"gitHead":"33c683f02d51935ec972f7705ced9a3ad57b55e8","_id":"redux-recycle@1.1.2","_shasum":"6a999028c5d15b713053b2222f2e3baa3669a629","_from":".","_npmVersion":"3.6.0","_nodeVersion":"5.7.0","_npmUser":{"name":"omnidan","email":"me@omnidan.net"},"dist":{"shasum":"6a999028c5d15b713053b2222f2e3baa3669a629","tarball":"https://registry.npmjs.org/redux-recycle/-/redux-recycle-1.1.2.tgz","integrity":"sha512-nj9dd2Fh8AnNNa+Y44MygXzUMOgT1iZVngZOKqdlEQllrYenT42f/YwUcbWCEPv9mqdm13SlaTrfbzIvq+tEfg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFq22jbsruVTptRnfUJ8vVa4urvMxlT9hRl21GZTvpS1AiACCxJSc/BDli64Ntq4ipEfNsDkFFmogtTjds0c+d6quw=="}]},"maintainers":[{"name":"omnidan","email":"daniel.bugl@touchlay.com"}],"_npmOperationalInternal":{"host":"packages-5-east.internal.npmjs.com","tmp":"tmp/redux-recycle-1.1.2.tgz_1456744225697_0.4208656002301723"}},"1.2.0":{"name":"redux-recycle","version":"1.2.0","description":"higher-order reducer to reset the redux state on certain actions","main":"lib/index.js","scripts":{"clean":"rimraf lib","build":"babel src --out-dir lib","lint":"eslint src test","test":"NODE_ENV=test ./node_modules/.bin/mocha --compilers js:babel-core/register --recursive","test:watch":"NODE_ENV=test ./node_modules/.bin/mocha --compilers js:babel-core/register --recursive --watch","test:cov":"babel-node ./node_modules/.bin/isparta cover ./node_modules/.bin/_mocha -- --recursive","prepublish":"npm run lint && npm run test && npm run clean && npm run build"},"repository":{"type":"git","url":"git+https://github.com/omnidan/redux-recycle.git"},"keywords":["redux","flux","recycle","state","higher-order reducer","hor"],"author":{"name":"Daniel Bugl","email":"me@omnidan.net","url":"https://github.com/omnidan"},"license":"MIT","bugs":{"url":"https://github.com/omnidan/redux-recycle/issues"},"homepage":"https://github.com/omnidan/redux-recycle","devDependencies":{"babel-cli":"^6.5.1","babel-core":"^6.5.2","babel-eslint":"^5.0.0","babel-plugin-transform-object-rest-spread":"^6.5.0","babel-preset-es2015":"^6.5.0","chai":"^3.5.0","eslint":"~2.2.0","eslint-config-standard":"~5.1.0","eslint-plugin-promise":"^1.0.8","eslint-plugin-standard":"^1.3.2","expect":"^1.14.0","isparta":"^4.0.0","mocha":"^2.4.5","rimraf":"^2.5.2"},"dependencies":{"redux":"^3.3.1"},"gitHead":"82f6c5375cc16e6a0d1eaee7402c5f5dba8cdc15","_id":"redux-recycle@1.2.0","_shasum":"53d1eb0f57f61bfef799e17a5fe87ab6c2f565d0","_from":".","_npmVersion":"3.8.6","_nodeVersion":"6.0.0","_npmUser":{"name":"omnidan","email":"me@omnidan.net"},"dist":{"shasum":"53d1eb0f57f61bfef799e17a5fe87ab6c2f565d0","tarball":"https://registry.npmjs.org/redux-recycle/-/redux-recycle-1.2.0.tgz","integrity":"sha512-SkIpN44fTOs3bW5iTuG/vdHzt47TBuwQeT6rqATzcLeE7RQJH+XBnVGnqZfq1kpsFc2L+/+fMBFHBK7YCQLSnQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFIusHTHxOvNg3QK2DgRObjaAu299ko72WAC1762W6MUAiEAi3fxyCrYqd/yvH6GtQTm6S7bWBYPiO4MNKplVJXy8As="}]},"maintainers":[{"name":"omnidan","email":"daniel.bugl@touchlay.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/redux-recycle-1.2.0.tgz_1469490120433_0.7097690149676055"}},"1.3.0":{"name":"redux-recycle","version":"1.3.0","description":"higher-order reducer to reset the redux state on certain actions","main":"lib/index.js","files":["lib/"],"scripts":{"clean":"rimraf lib","build":"babel src --out-dir lib","lint":"eslint src test","test":"NODE_ENV=test ./node_modules/.bin/mocha --compilers js:babel-core/register --recursive","test:watch":"NODE_ENV=test ./node_modules/.bin/mocha --compilers js:babel-core/register --recursive --watch","test:cov":"babel-node ./node_modules/.bin/isparta cover ./node_modules/.bin/_mocha -- --recursive","prepublish":"npm run lint && npm run test && npm run clean && npm run build"},"repository":{"type":"git","url":"git+https://github.com/omnidan/redux-recycle.git"},"keywords":["redux","flux","recycle","state","higher-order reducer","hor"],"author":{"name":"Daniel Bugl","email":"me@omnidan.net","url":"https://github.com/omnidan"},"license":"MIT","bugs":{"url":"https://github.com/omnidan/redux-recycle/issues"},"homepage":"https://github.com/omnidan/redux-recycle","devDependencies":{"babel-cli":"^6.5.1","babel-core":"^6.5.2","babel-eslint":"^5.0.0","babel-plugin-transform-object-rest-spread":"^6.5.0","babel-preset-es2015":"^6.5.0","chai":"^3.5.0","eslint":"~2.2.0","eslint-config-standard":"~5.1.0","eslint-plugin-promise":"^1.0.8","eslint-plugin-standard":"^1.3.2","expect":"^1.14.0","isparta":"^4.0.0","mocha":"^2.4.5","rimraf":"^2.5.2"},"dependencies":{"redux":"^3.3.1"},"gitHead":"229ead1b3da144bb94033517ab223f8616604742","_id":"redux-recycle@1.3.0","_shasum":"0344e60965f24073a63fdeead8cb13d75b7657c7","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.5.0","_npmUser":{"name":"omnidan","email":"me@omnidan.net"},"dist":{"shasum":"0344e60965f24073a63fdeead8cb13d75b7657c7","tarball":"https://registry.npmjs.org/redux-recycle/-/redux-recycle-1.3.0.tgz","integrity":"sha512-BrElXnpcKIwmRTIQ7/PIXUssloVByzoyK0/4XIhgZj/gDvicDB8TLNOzuxukyIRMtCAiq5BZ+RmGP8f3xUvRzw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC2QiNoQ0mloUIWsvwRenR/jWp8WK0WZTfm7/6PKmdvTgIhAND2IRPoZqxh8naKct1WTSpxWV0pIYn4S8yiwbgt0VHQ"}]},"maintainers":[{"name":"omnidan","email":"daniel.bugl@touchlay.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/redux-recycle-1.3.0.tgz_1488036934949_0.602435817476362"}},"1.4.0":{"name":"redux-recycle","version":"1.4.0","description":"higher-order reducer to reset the redux state on certain actions","main":"lib/index.js","files":["lib/"],"scripts":{"clean":"rimraf lib","build":"babel src --out-dir lib","lint":"eslint src test","test":"cross-env NODE_ENV=test ./node_modules/.bin/mocha --compilers js:babel-core/register --recursive","test:watch":"cross-env NODE_ENV=test ./node_modules/.bin/mocha --compilers js:babel-core/register --recursive --watch","test:cov":"babel-node ./node_modules/.bin/isparta cover ./node_modules/.bin/_mocha -- --recursive","prepublish":"npm run lint && npm run test && npm run clean && npm run build"},"repository":{"type":"git","url":"git+https://github.com/omnidan/redux-recycle.git"},"keywords":["redux","flux","recycle","state","higher-order reducer","hor"],"author":{"name":"Daniel Bugl","email":"me@omnidan.net","url":"https://github.com/omnidan"},"license":"MIT","bugs":{"url":"https://github.com/omnidan/redux-recycle/issues"},"homepage":"https://github.com/omnidan/redux-recycle","devDependencies":{"babel-cli":"^6.5.1","babel-core":"^6.5.2","babel-eslint":"^5.0.0","babel-plugin-transform-object-rest-spread":"^6.5.0","babel-preset-es2015":"^6.5.0","chai":"^3.5.0","cross-env":"^5.0.1","eslint":"~2.2.0","eslint-config-standard":"~5.1.0","eslint-plugin-promise":"^1.0.8","eslint-plugin-standard":"^1.3.2","expect":"^1.14.0","isparta":"^4.0.0","mocha":"^2.4.5","rimraf":"^2.5.2"},"dependencies":{"redux":"^3.3.1"},"gitHead":"abcbaea8b4e966bb23381651d306a9d530d7f48e","_id":"redux-recycle@1.4.0","_npmVersion":"5.0.4","_nodeVersion":"6.10.0","_npmUser":{"name":"omnidan","email":"me@omnidan.net"},"dist":{"integrity":"sha512-6ZirQGVJ4Ux5/mNEz6n5UQH+oE3nJJiQhDvH1StBKfCZGgRQMYn/L1EbvSHYwIfG579JrJpFn8ozC86Hg6Od9g==","shasum":"3507eb7b1b2086a02caea1ff06d4d788fa7bc0b0","tarball":"https://registry.npmjs.org/redux-recycle/-/redux-recycle-1.4.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCvlZUA3nOIqhEjWDo/yEAC9P3/Luqa6nxf38A/BBI6NQIhAJCBipb1bVF335V80ADkwP+FUSkbpBf1AeyhlqImRCTr"}]},"maintainers":[{"name":"omnidan","email":"daniel.bugl@touchlay.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-recycle-1.4.0.tgz_1499698146719_0.7377100514713675"}}},"readme":"# redux-recycle\n\n[![NPM version (>=1.0)](https://img.shields.io/npm/v/redux-recycle.svg?style=flat-square)](https://www.npmjs.com/package/redux-recycle) [![NPM Downloads](https://img.shields.io/npm/dm/redux-recycle.svg?style=flat-square)](https://www.npmjs.com/package/redux-recycle) [![Build Status](https://img.shields.io/travis/omnidan/redux-recycle/master.svg?style=flat-square)](https://travis-ci.org/omnidan/redux-recycle) [![Dependencies](https://img.shields.io/david/omnidan/redux-recycle.svg?style=flat-square)](https://david-dm.org/omnidan/redux-recycle) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](http://standardjs.com/) [![https://paypal.me/DanielBugl/9](https://img.shields.io/badge/donate-paypal-yellow.svg?style=flat-square)](https://paypal.me/DanielBugl/9)\n\n_higher-order reducer to reset the redux state on certain actions_\n\n\n## Installation\n\n```\nnpm install --save redux-recycle\n```\n\n## Resetting state\n\n```js\nimport recycleState from 'redux-recycle'\nrecycleState(reducer, actionArray, initialState, config)\n```\n\n`redux-recycle` is a reducer enhancer (higher-order reducer), it provides the\n`recycleState` function, which takes an existing reducer and an array of\nactions that will reset the state.\n\nOptionally, you can also pass an initial\nstate to reset to.\n\nOptionally, you can also pass a config object.\n\nCurrently, there is one config option:\n\n- `recycleActionType` (default: `@@redux-recycle/INIT`) - if recycleActionType is provided, the reducer function will be called with `initialState` and the provided action name. If set to `false`, the state will be reset without calling the reducer one more time.\n\n\n## API\n\n```js\nimport recycleState from 'redux-recycle'\n\n// recycle the state on the following list of actions\nrecycleState(reducer, [ARRAY_OF_ACTIONS])\n\n// also provide an initial state to reset to\nrecycleState(reducer, [ARRAY_OF_ACTIONS], initialState)\n\n// also provide an initial state to reset to, based on the state and action passed\nrecycleState(reducer, [ARRAY_OF_ACTIONS], (state, action) => initialState)\n\n// also provide the name of the action that will be called on the reducer when recycling it\nrecycleState(reducer, [ARRAY_OF_ACTIONS], (state, action) => initialState, {\n  recycleActionType: 'MY_OWN_ACTION_NAME'\n})\n\n// recycles the state to initialState without calling the reducer with any action\nrecycleState(reducer, [ARRAY_OF_ACTIONS], initialState, {\n  recycleActionType: false\n})\n```\n\n\n## Instructions\n\nFirstly, import `redux-recycle`:\n\n```js\n// Redux utility functions\nimport { combineReducers } from 'redux';\n// redux-recycle higher-order reducer\nimport recycleState from 'redux-recycle';\n```\n\nThen, add `recycleState` to your reducer(s) like this:\n\n```js\ncombineReducers({\n  counter: recycleState(counter, [INCREMENT_COUNTER], 0)\n})\n```\n\nNow, once you click the increment button, the state will be reset to `0`.\n\nIf you need more complex initialization logic, you can provide a `reducer function` as the last param. It will be called with the state and action to get the initial state.\n\n```js\n\n// here you don't allow resetting counting 10 times\nconst resetCounter = (state, action) => {\n  return state > 10 ? state : 0\n}\n\ncombineReducers({\n  counter: recycleState(counter, [RESET_COUNTERS], resetCounter)\n})\n```\n\n\n## What is this magic? How does it work?\n\nHave a read of the [Implementing Undo History recipe](https://rackt.github.io/redux/docs/recipes/ImplementingUndoHistory.html)\nin the Redux documents, which explains in detail how higher-order reducers work.\n\n\n## License\n\nMIT, see `LICENSE.md` for more information.\n","maintainers":[{"name":"omnidan","email":"daniel.bugl@touchlay.com"}],"time":{"modified":"2022-06-26T10:21:49.572Z","created":"2015-10-18T19:34:03.982Z","1.0.0":"2015-10-18T19:34:03.982Z","1.0.1":"2016-01-11T13:45:33.711Z","1.1.0":"2016-02-20T18:24:56.483Z","1.1.1":"2016-02-22T20:41:39.400Z","1.1.2":"2016-02-29T11:10:27.154Z","1.2.0":"2016-07-25T23:42:02.603Z","1.3.0":"2017-02-25T15:35:35.540Z","1.4.0":"2017-07-10T14:49:07.959Z"},"homepage":"https://github.com/omnidan/redux-recycle","keywords":["redux","flux","recycle","state","higher-order reducer","hor"],"repository":{"type":"git","url":"git+https://github.com/omnidan/redux-recycle.git"},"author":{"name":"Daniel Bugl","email":"me@omnidan.net","url":"https://github.com/omnidan"},"bugs":{"url":"https://github.com/omnidan/redux-recycle/issues"},"license":"MIT","readmeFilename":"README.md"}