{"id":18545882,"url":"https://github.com/guillaumearm/redux-fun","last_synced_at":"2026-05-02T02:34:35.247Z","repository":{"id":57350791,"uuid":"115801295","full_name":"guillaumearm/redux-fun","owner":"guillaumearm","description":":wrench: - Redux functional programming utilities","archived":false,"fork":false,"pushed_at":"2020-06-02T18:15:22.000Z","size":5379,"stargazers_count":2,"open_issues_count":24,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-07T10:37:32.656Z","etag":null,"topics":["fp","functional-programming","handler","middleware","reducer","redux","selector","updater"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/guillaumearm.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-12-30T14:17:41.000Z","updated_at":"2018-12-25T12:12:07.000Z","dependencies_parsed_at":"2022-09-16T21:11:57.937Z","dependency_job_id":null,"html_url":"https://github.com/guillaumearm/redux-fun","commit_stats":null,"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"purl":"pkg:github/guillaumearm/redux-fun","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guillaumearm%2Fredux-fun","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guillaumearm%2Fredux-fun/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guillaumearm%2Fredux-fun/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guillaumearm%2Fredux-fun/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/guillaumearm","download_url":"https://codeload.github.com/guillaumearm/redux-fun/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guillaumearm%2Fredux-fun/sbom","scorecard":{"id":448697,"data":{"date":"2025-08-11","repo":{"name":"github.com/guillaumearm/redux-fun","commit":"89947e83b71d2dd77aaf5bba05016d559dbf4a5f"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 0/20 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v1.3.7 not signed: https://api.github.com/repos/guillaumearm/redux-fun/releases/10866987","Warn: release artifact v1.3.6 not signed: https://api.github.com/repos/guillaumearm/redux-fun/releases/10342884","Warn: release artifact v1.3.5 not signed: https://api.github.com/repos/guillaumearm/redux-fun/releases/10335569","Warn: release artifact v1.3.4 not signed: https://api.github.com/repos/guillaumearm/redux-fun/releases/10335342","Warn: release artifact v1.3.3 not signed: https://api.github.com/repos/guillaumearm/redux-fun/releases/10334227","Warn: release artifact v1.3.7 does not have provenance: https://api.github.com/repos/guillaumearm/redux-fun/releases/10866987","Warn: release artifact v1.3.6 does not have provenance: https://api.github.com/repos/guillaumearm/redux-fun/releases/10342884","Warn: release artifact v1.3.5 does not have provenance: https://api.github.com/repos/guillaumearm/redux-fun/releases/10335569","Warn: release artifact v1.3.4 does not have provenance: https://api.github.com/repos/guillaumearm/redux-fun/releases/10335342","Warn: release artifact v1.3.3 does not have provenance: https://api.github.com/repos/guillaumearm/redux-fun/releases/10334227"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 25 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"106 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-6chw-6frg-f759","Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-fwr7-v2mv-hh25","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-cwfw-4gq5-mrqx","Warn: Project is vulnerable to: GHSA-g95f-p29q-9xw4","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-mh2h-6j8q-x246","Warn: Project is vulnerable to: GHSA-5q88-cjfq-g2mh","Warn: Project is vulnerable to: GHSA-xp63-6vf5-xf3v","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-rq8g-5pc5-wrhr","Warn: Project is vulnerable to: GHSA-9vvw-cc9w-f27h","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-hr2v-3952-633q","Warn: Project is vulnerable to: GHSA-h6ch-v84p-w6p9","Warn: Project is vulnerable to: GHSA-ff7x-qrg7-qggm","Warn: Project is vulnerable to: GHSA-qrmc-fj45-qfc2","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-8r6j-v8pm-fqw3","Warn: Project is vulnerable to: MAL-2023-462","Warn: Project is vulnerable to: GHSA-xf7w-r453-m56c","Warn: Project is vulnerable to: GHSA-4q6p-r6v2-jvc5","Warn: Project is vulnerable to: GHSA-pfrx-2q88-qq97","Warn: Project is vulnerable to: GHSA-q42p-pg8m-cqh6","Warn: Project is vulnerable to: GHSA-w457-6q6x-cgp9","Warn: Project is vulnerable to: GHSA-62gr-4qp9-h98f","Warn: Project is vulnerable to: GHSA-f52g-6jhx-586p","Warn: Project is vulnerable to: GHSA-2cf5-4w76-r9qv","Warn: Project is vulnerable to: GHSA-3cqr-58rm-57f8","Warn: Project is vulnerable to: GHSA-g9r4-xpmj-mj65","Warn: Project is vulnerable to: GHSA-q2c6-c6pm-g3gh","Warn: Project is vulnerable to: GHSA-765h-qjxv-5f44","Warn: Project is vulnerable to: GHSA-f2jv-r9rf-7988","Warn: Project is vulnerable to: GHSA-44pw-h2cw-w3vq","Warn: Project is vulnerable to: GHSA-jp4x-w63m-7wgm","Warn: Project is vulnerable to: GHSA-c429-5p7v-vgjp","Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj","Warn: Project is vulnerable to: GHSA-rc47-6667-2j5j","Warn: Project is vulnerable to: GHSA-pc5p-h8pf-mvwp","Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37","Warn: Project is vulnerable to: GHSA-2pr6-76vf-7546","Warn: Project is vulnerable to: GHSA-8j8c-7jfh-h6hx","Warn: Project is vulnerable to: GHSA-896r-f27r-55mw","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-6c8f-qphg-qjgp","Warn: Project is vulnerable to: GHSA-4xc9-xhrj-v574","Warn: Project is vulnerable to: GHSA-x5rq-j2xg-h7qm","Warn: Project is vulnerable to: GHSA-jf85-cpcp-j695","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-xf5p-87ch-gxw2","Warn: Project is vulnerable to: GHSA-ch52-vgq2-943f","Warn: Project is vulnerable to: GHSA-5v2h-r2cx-5xgj","Warn: Project is vulnerable to: GHSA-rrrm-qjm4-v8hf","Warn: Project is vulnerable to: GHSA-4xcv-9jjx-gfj3","Warn: Project is vulnerable to: GHSA-f9cm-qmx5-m98h","Warn: Project is vulnerable to: GHSA-7wpw-2hjm-89gp","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-fhjf-83wg-r2j9","Warn: Project is vulnerable to: GHSA-r683-j2x4-v87g","Warn: Project is vulnerable to: GHSA-w7rc-rwvf-8q5r","Warn: Project is vulnerable to: GHSA-5fw9-fq32-wv5p","Warn: Project is vulnerable to: GHSA-4p35-cfcx-8653","Warn: Project is vulnerable to: GHSA-7f3x-x4pr-wqhj","Warn: Project is vulnerable to: GHSA-jpp7-7chh-cf67","Warn: Project is vulnerable to: GHSA-q6wq-5p59-983w","Warn: Project is vulnerable to: GHSA-j9fq-vwqv-2fm2","Warn: Project is vulnerable to: GHSA-pqw5-jmp5-px4v","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-g6ww-v8xp-vmwg","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-6g33-f262-xjp4","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm","Warn: Project is vulnerable to: GHSA-r2j6-p67h-q639","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-44c6-4v22-4mhx","Warn: Project is vulnerable to: GHSA-4x5v-gmq8-25ch","Warn: Project is vulnerable to: GHSA-4g88-fppr-53pp","Warn: Project is vulnerable to: GHSA-4jqc-8m5r-9rpr","Warn: Project is vulnerable to: GHSA-4rq4-32rv-6wp6","Warn: Project is vulnerable to: GHSA-64g7-mvw6-v9qj","Warn: Project is vulnerable to: GHSA-2m39-62fm-q8r3","Warn: Project is vulnerable to: GHSA-mf6x-7mm4-x2g7","Warn: Project is vulnerable to: GHSA-j44m-qm6p-hp7m","Warn: Project is vulnerable to: GHSA-3jfq-g458-7qm9","Warn: Project is vulnerable to: GHSA-5955-9wpr-37jh","Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-jgrx-mgxx-jf9v","Warn: Project is vulnerable to: GHSA-g7q5-pjjr-gqvp","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-7p7h-4mm5-852v","Warn: Project is vulnerable to: GHSA-38fc-wpqx-33j7","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q","Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh","Warn: Project is vulnerable to: GHSA-p9pc-299p-vxgp"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T07:35:54.253Z","repository_id":57350791,"created_at":"2025-08-19T07:35:54.253Z","updated_at":"2025-08-19T07:35:54.253Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32521091,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-02T01:12:54.858Z","status":"online","status_checked_at":"2026-05-02T02:00:05.923Z","response_time":132,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fp","functional-programming","handler","middleware","reducer","redux","selector","updater"],"created_at":"2024-11-06T20:22:42.821Z","updated_at":"2026-05-02T02:34:35.227Z","avatar_url":"https://github.com/guillaumearm.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# redux-fun :wrench:\n\n[![CircleCI branch](https://img.shields.io/circleci/project/github/guillaumearm/redux-fun/master.svg)](https://circleci.com/gh/guillaumearm/redux-fun)\n[![codecov](https://codecov.io/gh/guillaumearm/redux-fun/branch/master/graph/badge.svg)](https://codecov.io/gh/guillaumearm/redux-fun)\n[![npm](https://img.shields.io/npm/v/redux-fun.svg)](https://www.npmjs.com/package/redux-fun)\n[![Greenkeeper badge](https://badges.greenkeeper.io/guillaumearm/redux-fun.svg)](https://greenkeeper.io/)\n[![NSP Status](https://nodesecurity.io/orgs/trapcodien/projects/b0aa847e-a5c4-4758-9aab-d4e23d15d3d1/badge)](https://nodesecurity.io/orgs/trapcodien/projects/b0aa847e-a5c4-4758-9aab-d4e23d15d3d1)\n[![dependencies Status](https://david-dm.org/guillaumearm/redux-fun/status.svg)](https://david-dm.org/guillaumearm/redux-fun)\n[![devDependencies Status](https://david-dm.org/guillaumearm/redux-fun/dev-status.svg)](https://david-dm.org/guillaumearm/redux-fun?type=dev)\n[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/guillaumearm/redux-fun/blob/master/CONTRIBUTING.md)\n[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)\n[![Join the chat at https://gitter.im/redux-fun/Lobby](https://badges.gitter.im/redux-fun/Lobby.svg)](https://gitter.im/redux-fun/Lobby?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n\nRedux functional programming utilities\n\n## Install\n```bash\n$ npm install --save redux-fun\n```\n\n## Documentation\n\n\n### Reducers\n\n##### Compose reducers\n```js\n  const { composeReducers, pipeReducers } = require('redux-fun');\n\n  const reducer_1 = composeReducers(r3, r2, r1);\n  const reducer_2 = pipeReducers(r1, r2, r3);\n```\n\n##### Convert updaters\n```js\nconst { toReducer } = require('redux-fun');\nconst updater = (action) =\u003e state =\u003e state;\nconst reducer = toReducer(updater);\n```\n\n----------------------\n\n### Updaters\n##### updater with initial state\n```js\nconst { withDefaultState } = require('redux-fun');\n\n// normal\nconst updater_1 = withDefaultState({}, action =\u003e state =\u003e state);\n\n// curried\nconst updater_2 = withDefaultState({})(action =\u003e state =\u003e state);\n```\n----------------------\n\n### Middlewares\n\n##### Compose middlewares\n```js\n  const { composeMiddlewares, pipeMiddlewares } = require('redux-fun');\n\n  const middleware_1 = composeMiddlewares(m3, m2, m1);\n  const middleware_2 = pipeMiddlewares(m1, m2, m3);\n```\n\n##### Preserve async flow (deprecated)\nUse preserveAsyncSeries instead\n\n##### Preserve async series\nRespect the dispatch order with async middleware\n```js\n  const { preserveAsyncSeries } = require('redux-fun');\n  const middleware_1 = preserveAsyncSeries('ACTION_TYPE')\n  const middleware_2 = preserveAsyncSeries(['ACTION_TYPE_1', 'ACTION_TYPE_2'])\n```\n----------------------\n\n### Handlers\nA [Handler](https://github.com/guillaumearm/handle-io/#handlers) from the [handle-io](https://github.com/guillaumearm/handle-io) library can be tranformed into redux middleware using [createHandleIOMiddleware](https://github.com/guillaumearm/redux-fun#createhandleiomiddleware) function.\n\n#### Redux Handlers\n\nA `redux handler` run every time an action was dispatched.\n\nIt takes two arguments:\n- **action**\n- **reduxHandleIOApi**\n\n\n\nThe **reduxHandleIOApi** object provides 3 [IOs](https://github.com/guillaumearm/handle-io/#io) functions :\n- **getState**\n- **dispatch**\n- **next**\n\nPlease see [handle-io documentation](https://github.com/guillaumearm/handle-io/#readme) for more details.\n\n**e.g.**\n\n```js\nconst { io, handler } = require('handle-io');\n\nconst sleep = io(s =\u003e new Promise(resolve =\u003e setTimeout(resolve, s * 1000)));\n\n// delayed action example\nconst myHandler1 = handler(function*(action, { next }) {\n  yield sleep(1);\n  return yield next(action);\n});\n\n// preserve dispatch order\nconst myHandler2 = handler(function*(action, { next, dispatch }) {\n  const nexted = yield next(action);\n  yield dispatch({ type: 'DUMMY_ACTION' });\n  return nexted;\n});\n\n// print state\nconst log = io(console.log);\nconst myHandler3 = handler(function*(action, { next, getState }) {\n  const nexted = yield next(action);\n  const state = yield getState();\n  yield log(state);\n  return nexted;\n})\n```\n\n**Note:** A `redux handler` acts as an async middleware.\n\n#### testReduxHandler\n\n`testReduxHandler` is an extension of [handle-io#testHandler](https://github.com/guillaumearm/handle-io/#test-side-effects-orchestration-without-pain)\n\nit adds 3 **match\\*()** methods:\n- **.matchNext()** - 2 arguments:\n  - next argument **(assert)**\n  - next return **(mock)**\n- **.matchDispatch()** - 2 arguments:\n  - dispatch argument **(assert)**\n  - dispatch return **(mock)**\n- **.matchGetState()** - 1 argument:\n  - getState return **(mock)**\n\n**e.g.**\n```js\nconst { handler } = require('handle-io');\nconst { testReduxHandler } = require('redux-fun');\n\nconst createDummyAction = (payload) =\u003e { type: 'DUMMY_ACTION', payload }\nconst myAction = { type: 'MY_ACTION', payload: {} };\n\nconst myHandler4 = handler(function*(action, { dispatch, getState, next }) {\n  const { value } = yield getState();\n  yield dispatch(createDummyAction(value));\n  return yield next(myAction);\n})\n\ntestReduxHandler(myHandler4, myAction)\n  .matchGetState({ value: 42 })\n  .matchDispatch(createDummyAction(42))\n  .matchNext(myAction, 'returned value')\n  .shouldReturn('returned value')\n  .run()\n```\n\n#### createHandleIOMiddleware\n\n**usage:**\n```js\nconst { createHandleIOMiddleware } = require('redux-fun');\nconst handleIOMiddleware = createHandleIOMiddleware(myHandler1, myHandler2, myHandler3, myHandler4)\n```\n\n----------------------\n### Selectors\n\n##### Bind selectors\n\n```js\n  const { bindSelectors } = require('redux-fun');\n\n  const selectors = {\n    getUsers: (state) =\u003e state.users,\n    getUser: (state, { id }) =\u003e state.users[id],\n  }\n\n  const boundSelectors = bindSelectors(selectors, store.getState);\n  const user = boundSelectors.getUser({ id: 1 });\n```\n\n##### getOwnProp\n\n`getOwnProp` is very useful to use with createSelector from [reselect](https://github.com/reactjs/reselect)\n\n```js\nconst { createSelector } = require('reselect');\nconst { getOwnProp } = require('redux-fun');\n\nconst getUsers = (state = {}) =\u003e state.users || {}\n\nconst getUserByName = createSelector(\n  getUsers,\n  getOwnProp('fullName'),\n  (users, fullName) =\u003e users[fullName]\n)\n\ngetUserByName({ users: { user1: true } }, { fullName: 'user1' }); // =\u003e true\n```\n----------------------\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguillaumearm%2Fredux-fun","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fguillaumearm%2Fredux-fun","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguillaumearm%2Fredux-fun/lists"}