{"action":"created","comment":{"url":"https://api.github.com/repos/BenjaminVanRyseghem/switchless-redux-actions/pulls/comments/210577741","pull_request_review_id":146821169,"id":210577741,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMDU3Nzc0MQ==","diff_hunk":"@@ -0,0 +1,25 @@\n+import { registerReducer } from \"../actions/abstractAction\";\n+\n+/**\n+ * Wrap reducer to merge returned state with previous state.\n+ * This allow actions to only return partial updates.\n+ *\n+ * @param {function} reducer - Reducer to wrap\n+ * @param {string} name - The name of the reducer\n+ * @return {function} Wrapped reducer\n+ */\n+export function wrapper(reducer, name) {\n+\n+\tif (!reducer) {\n+\t\tthrow new Error(\"A reducer is required\");\n+\t}\n+\n+\tif (!name) {\n+\t\tthrow new Error(\"A name is required\");\n+\t}\n+\n+\tregisterReducer(name);\n+\n+\treturn (state, action) => Object.assign({}, state, reducer(state, action) || {});\n+","path":"src/reducers/index.js","position":24,"original_position":24,"commit_id":"09365c49c0eb1a54aa0c079ca59421bb393d48d9","original_commit_id":"09365c49c0eb1a54aa0c079ca59421bb393d48d9","user":{"login":"BenjaminVanRyseghem","id":407891,"node_id":"MDQ6VXNlcjQwNzg5MQ==","avatar_url":"https://avatars3.githubusercontent.com/u/407891?v=4","gravatar_id":"","url":"https://api.github.com/users/BenjaminVanRyseghem","html_url":"https://github.com/BenjaminVanRyseghem","followers_url":"https://api.github.com/users/BenjaminVanRyseghem/followers","following_url":"https://api.github.com/users/BenjaminVanRyseghem/following{/other_user}","gists_url":"https://api.github.com/users/BenjaminVanRyseghem/gists{/gist_id}","starred_url":"https://api.github.com/users/BenjaminVanRyseghem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BenjaminVanRyseghem/subscriptions","organizations_url":"https://api.github.com/users/BenjaminVanRyseghem/orgs","repos_url":"https://api.github.com/users/BenjaminVanRyseghem/repos","events_url":"https://api.github.com/users/BenjaminVanRyseghem/events{/privacy}","received_events_url":"https://api.github.com/users/BenjaminVanRyseghem/received_events","type":"User","site_admin":false},"body":"ligne vide en trop","created_at":"2018-08-16T12:36:28Z","updated_at":"2018-08-16T12:37:00Z","html_url":"https://github.com/BenjaminVanRyseghem/switchless-redux-actions/pull/1#discussion_r210577741","pull_request_url":"https://api.github.com/repos/BenjaminVanRyseghem/switchless-redux-actions/pulls/1","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/BenjaminVanRyseghem/switchless-redux-actions/pulls/comments/210577741"},"html":{"href":"https://github.com/BenjaminVanRyseghem/switchless-redux-actions/pull/1#discussion_r210577741"},"pull_request":{"href":"https://api.github.com/repos/BenjaminVanRyseghem/switchless-redux-actions/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/BenjaminVanRyseghem/switchless-redux-actions/pulls/1","id":206397200,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA2Mzk3MjAw","html_url":"https://github.com/BenjaminVanRyseghem/switchless-redux-actions/pull/1","diff_url":"https://github.com/BenjaminVanRyseghem/switchless-redux-actions/pull/1.diff","patch_url":"https://github.com/BenjaminVanRyseghem/switchless-redux-actions/pull/1.patch","issue_url":"https://api.github.com/repos/BenjaminVanRyseghem/switchless-redux-actions/issues/1","number":1,"state":"open","locked":false,"title":"Add function to wrap one reducer","user":{"login":"vinz51","id":10948086,"node_id":"MDQ6VXNlcjEwOTQ4MDg2","avatar_url":"https://avatars1.githubusercontent.com/u/10948086?v=4","gravatar_id":"","url":"https://api.github.com/users/vinz51","html_url":"https://github.com/vinz51","followers_url":"https://api.github.com/users/vinz51/followers","following_url":"https://api.github.com/users/vinz51/following{/other_user}","gists_url":"https://api.github.com/users/vinz51/gists{/gist_id}","starred_url":"https://api.github.com/users/vinz51/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vinz51/subscriptions","organizations_url":"https://api.github.com/users/vinz51/orgs","repos_url":"https://api.github.com/users/vinz51/repos","events_url":"https://api.github.com/users/vinz51/events{/privacy}","received_events_url":"https://api.github.com/users/vinz51/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-08-06T13:21:58Z","updated_at":"2018-08-16T12:37:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"96842c181caacbd18fad6f13b17700c3efa2ea04","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/BenjaminVanRyseghem/switchless-redux-actions/pulls/1/commits","review_comments_url":"https://api.github.com/repos/BenjaminVanRyseghem/switchless-redux-actions/pulls/1/comments","review_comment_url":"https://api.github.com/repos/BenjaminVanRyseghem/switchless-redux-actions/pulls/comments{/number}","comments_url":"https://api.github.com/repos/BenjaminVanRyseghem/switchless-redux-actions/issues/1/comments","statuses_url":"https://api.github.com/repos/BenjaminVanRyseghem/switchless-redux-actions/statuses/09365c49c0eb1a54aa0c079ca59421bb393d48d9","head":{"label":"vinz51:dev/add-wrapreducer","ref":"dev/add-wrapreducer","sha":"09365c49c0eb1a54aa0c079ca59421bb393d48d9","user":{"login":"vinz51","id":10948086,"node_id":"MDQ6VXNlcjEwOTQ4MDg2","avatar_url":"https://avatars1.githubusercontent.com/u/10948086?v=4","gravatar_id":"","url":"https://api.github.com/users/vinz51","html_url":"https://github.com/vinz51","followers_url":"https://api.github.com/users/vinz51/followers","following_url":"https://api.github.com/users/vinz51/following{/other_user}","gists_url":"https://api.github.com/users/vinz51/gists{/gist_id}","starred_url":"https://api.github.com/users/vinz51/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vinz51/subscriptions","organizations_url":"https://api.github.com/users/vinz51/orgs","repos_url":"https://api.github.com/users/vinz51/repos","events_url":"https://api.github.com/users/vinz51/events{/privacy}","received_events_url":"https://api.github.com/users/vinz51/received_events","type":"User","site_admin":false},"repo":{"id":143730655,"node_id":"MDEwOlJlcG9zaXRvcnkxNDM3MzA2NTU=","name":"switchless-redux-actions","full_name":"vinz51/switchless-redux-actions","owner":{"login":"vinz51","id":10948086,"node_id":"MDQ6VXNlcjEwOTQ4MDg2","avatar_url":"https://avatars1.githubusercontent.com/u/10948086?v=4","gravatar_id":"","url":"https://api.github.com/users/vinz51","html_url":"https://github.com/vinz51","followers_url":"https://api.github.com/users/vinz51/followers","following_url":"https://api.github.com/users/vinz51/following{/other_user}","gists_url":"https://api.github.com/users/vinz51/gists{/gist_id}","starred_url":"https://api.github.com/users/vinz51/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vinz51/subscriptions","organizations_url":"https://api.github.com/users/vinz51/orgs","repos_url":"https://api.github.com/users/vinz51/repos","events_url":"https://api.github.com/users/vinz51/events{/privacy}","received_events_url":"https://api.github.com/users/vinz51/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vinz51/switchless-redux-actions","description":"Abstract actions for a switchless redux","fork":true,"url":"https://api.github.com/repos/vinz51/switchless-redux-actions","forks_url":"https://api.github.com/repos/vinz51/switchless-redux-actions/forks","keys_url":"https://api.github.com/repos/vinz51/switchless-redux-actions/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vinz51/switchless-redux-actions/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vinz51/switchless-redux-actions/teams","hooks_url":"https://api.github.com/repos/vinz51/switchless-redux-actions/hooks","issue_events_url":"https://api.github.com/repos/vinz51/switchless-redux-actions/issues/events{/number}","events_url":"https://api.github.com/repos/vinz51/switchless-redux-actions/events","assignees_url":"https://api.github.com/repos/vinz51/switchless-redux-actions/assignees{/user}","branches_url":"https://api.github.com/repos/vinz51/switchless-redux-actions/branches{/branch}","tags_url":"https://api.github.com/repos/vinz51/switchless-redux-actions/tags","blobs_url":"https://api.github.com/repos/vinz51/switchless-redux-actions/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vinz51/switchless-redux-actions/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vinz51/switchless-redux-actions/git/refs{/sha}","trees_url":"https://api.github.com/repos/vinz51/switchless-redux-actions/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vinz51/switchless-redux-actions/statuses/{sha}","languages_url":"https://api.github.com/repos/vinz51/switchless-redux-actions/languages","stargazers_url":"https://api.github.com/repos/vinz51/switchless-redux-actions/stargazers","contributors_url":"https://api.github.com/repos/vinz51/switchless-redux-actions/contributors","subscribers_url":"https://api.github.com/repos/vinz51/switchless-redux-actions/subscribers","subscription_url":"https://api.github.com/repos/vinz51/switchless-redux-actions/subscription","commits_url":"https://api.github.com/repos/vinz51/switchless-redux-actions/commits{/sha}","git_commits_url":"https://api.github.com/repos/vinz51/switchless-redux-actions/git/commits{/sha}","comments_url":"https://api.github.com/repos/vinz51/switchless-redux-actions/comments{/number}","issue_comment_url":"https://api.github.com/repos/vinz51/switchless-redux-actions/issues/comments{/number}","contents_url":"https://api.github.com/repos/vinz51/switchless-redux-actions/contents/{+path}","compare_url":"https://api.github.com/repos/vinz51/switchless-redux-actions/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vinz51/switchless-redux-actions/merges","archive_url":"https://api.github.com/repos/vinz51/switchless-redux-actions/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vinz51/switchless-redux-actions/downloads","issues_url":"https://api.github.com/repos/vinz51/switchless-redux-actions/issues{/number}","pulls_url":"https://api.github.com/repos/vinz51/switchless-redux-actions/pulls{/number}","milestones_url":"https://api.github.com/repos/vinz51/switchless-redux-actions/milestones{/number}","notifications_url":"https://api.github.com/repos/vinz51/switchless-redux-actions/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vinz51/switchless-redux-actions/labels{/name}","releases_url":"https://api.github.com/repos/vinz51/switchless-redux-actions/releases{/id}","deployments_url":"https://api.github.com/repos/vinz51/switchless-redux-actions/deployments","created_at":"2018-08-06T13:13:15Z","updated_at":"2018-08-06T13:13:18Z","pushed_at":"2018-08-06T13:21:22Z","git_url":"git://github.com/vinz51/switchless-redux-actions.git","ssh_url":"git@github.com:vinz51/switchless-redux-actions.git","clone_url":"https://github.com/vinz51/switchless-redux-actions.git","svn_url":"https://github.com/vinz51/switchless-redux-actions","homepage":null,"size":112,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"BenjaminVanRyseghem:master","ref":"master","sha":"83d2640edaa815f39bbdd62d373cdf5f1a967e89","user":{"login":"BenjaminVanRyseghem","id":407891,"node_id":"MDQ6VXNlcjQwNzg5MQ==","avatar_url":"https://avatars3.githubusercontent.com/u/407891?v=4","gravatar_id":"","url":"https://api.github.com/users/BenjaminVanRyseghem","html_url":"https://github.com/BenjaminVanRyseghem","followers_url":"https://api.github.com/users/BenjaminVanRyseghem/followers","following_url":"https://api.github.com/users/BenjaminVanRyseghem/following{/other_user}","gists_url":"https://api.github.com/users/BenjaminVanRyseghem/gists{/gist_id}","starred_url":"https://api.github.com/users/BenjaminVanRyseghem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BenjaminVanRyseghem/subscriptions","organizations_url":"https://api.github.com/users/BenjaminVanRyseghem/orgs","repos_url":"https://api.github.com/users/BenjaminVanRyseghem/repos","events_url":"https://api.github.com/users/BenjaminVanRyseghem/events{/privacy}","received_events_url":"https://api.github.com/users/BenjaminVanRyseghem/received_events","type":"User","site_admin":false},"repo":{"id":143287280,"node_id":"MDEwOlJlcG9zaXRvcnkxNDMyODcyODA=","name":"switchless-redux-actions","full_name":"BenjaminVanRyseghem/switchless-redux-actions","owner":{"login":"BenjaminVanRyseghem","id":407891,"node_id":"MDQ6VXNlcjQwNzg5MQ==","avatar_url":"https://avatars3.githubusercontent.com/u/407891?v=4","gravatar_id":"","url":"https://api.github.com/users/BenjaminVanRyseghem","html_url":"https://github.com/BenjaminVanRyseghem","followers_url":"https://api.github.com/users/BenjaminVanRyseghem/followers","following_url":"https://api.github.com/users/BenjaminVanRyseghem/following{/other_user}","gists_url":"https://api.github.com/users/BenjaminVanRyseghem/gists{/gist_id}","starred_url":"https://api.github.com/users/BenjaminVanRyseghem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BenjaminVanRyseghem/subscriptions","organizations_url":"https://api.github.com/users/BenjaminVanRyseghem/orgs","repos_url":"https://api.github.com/users/BenjaminVanRyseghem/repos","events_url":"https://api.github.com/users/BenjaminVanRyseghem/events{/privacy}","received_events_url":"https://api.github.com/users/BenjaminVanRyseghem/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/BenjaminVanRyseghem/switchless-redux-actions","description":"Abstract actions for a switchless redux","fork":false,"url":"https://api.github.com/repos/BenjaminVanRyseghem/switchless-redux-actions","forks_url":"https://api.github.com/repos/BenjaminVanRyseghem/switchless-redux-actions/forks","keys_url":"https://api.github.com/repos/BenjaminVanRyseghem/switchless-redux-actions/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BenjaminVanRyseghem/switchless-redux-actions/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BenjaminVanRyseghem/switchless-redux-actions/teams","hooks_url":"https://api.github.com/repos/BenjaminVanRyseghem/switchless-redux-actions/hooks","issue_events_url":"https://api.github.com/repos/BenjaminVanRyseghem/switchless-redux-actions/issues/events{/number}","events_url":"https://api.github.com/repos/BenjaminVanRyseghem/switchless-redux-actions/events","assignees_url":"https://api.github.com/repos/BenjaminVanRyseghem/switchless-redux-actions/assignees{/user}","branches_url":"https://api.github.com/repos/BenjaminVanRyseghem/switchless-redux-actions/branches{/branch}","tags_url":"https://api.github.com/repos/BenjaminVanRyseghem/switchless-redux-actions/tags","blobs_url":"https://api.github.com/repos/BenjaminVanRyseghem/switchless-redux-actions/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BenjaminVanRyseghem/switchless-redux-actions/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BenjaminVanRyseghem/switchless-redux-actions/git/refs{/sha}","trees_url":"https://api.github.com/repos/BenjaminVanRyseghem/switchless-redux-actions/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BenjaminVanRyseghem/switchless-redux-actions/statuses/{sha}","languages_url":"https://api.github.com/repos/BenjaminVanRyseghem/switchless-redux-actions/languages","stargazers_url":"https://api.github.com/repos/BenjaminVanRyseghem/switchless-redux-actions/stargazers","contributors_url":"https://api.github.com/repos/BenjaminVanRyseghem/switchless-redux-actions/contributors","subscribers_url":"https://api.github.com/repos/BenjaminVanRyseghem/switchless-redux-actions/subscribers","subscription_url":"https://api.github.com/repos/BenjaminVanRyseghem/switchless-redux-actions/subscription","commits_url":"https://api.github.com/repos/BenjaminVanRyseghem/switchless-redux-actions/commits{/sha}","git_commits_url":"https://api.github.com/repos/BenjaminVanRyseghem/switchless-redux-actions/git/commits{/sha}","comments_url":"https://api.github.com/repos/BenjaminVanRyseghem/switchless-redux-actions/comments{/number}","issue_comment_url":"https://api.github.com/repos/BenjaminVanRyseghem/switchless-redux-actions/issues/comments{/number}","contents_url":"https://api.github.com/repos/BenjaminVanRyseghem/switchless-redux-actions/contents/{+path}","compare_url":"https://api.github.com/repos/BenjaminVanRyseghem/switchless-redux-actions/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BenjaminVanRyseghem/switchless-redux-actions/merges","archive_url":"https://api.github.com/repos/BenjaminVanRyseghem/switchless-redux-actions/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BenjaminVanRyseghem/switchless-redux-actions/downloads","issues_url":"https://api.github.com/repos/BenjaminVanRyseghem/switchless-redux-actions/issues{/number}","pulls_url":"https://api.github.com/repos/BenjaminVanRyseghem/switchless-redux-actions/pulls{/number}","milestones_url":"https://api.github.com/repos/BenjaminVanRyseghem/switchless-redux-actions/milestones{/number}","notifications_url":"https://api.github.com/repos/BenjaminVanRyseghem/switchless-redux-actions/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BenjaminVanRyseghem/switchless-redux-actions/labels{/name}","releases_url":"https://api.github.com/repos/BenjaminVanRyseghem/switchless-redux-actions/releases{/id}","deployments_url":"https://api.github.com/repos/BenjaminVanRyseghem/switchless-redux-actions/deployments","created_at":"2018-08-02T11:44:38Z","updated_at":"2018-08-03T19:37:24Z","pushed_at":"2018-08-06T13:21:59Z","git_url":"git://github.com/BenjaminVanRyseghem/switchless-redux-actions.git","ssh_url":"git@github.com:BenjaminVanRyseghem/switchless-redux-actions.git","clone_url":"https://github.com/BenjaminVanRyseghem/switchless-redux-actions.git","svn_url":"https://github.com/BenjaminVanRyseghem/switchless-redux-actions","homepage":null,"size":110,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/BenjaminVanRyseghem/switchless-redux-actions/pulls/1"},"html":{"href":"https://github.com/BenjaminVanRyseghem/switchless-redux-actions/pull/1"},"issue":{"href":"https://api.github.com/repos/BenjaminVanRyseghem/switchless-redux-actions/issues/1"},"comments":{"href":"https://api.github.com/repos/BenjaminVanRyseghem/switchless-redux-actions/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/BenjaminVanRyseghem/switchless-redux-actions/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/BenjaminVanRyseghem/switchless-redux-actions/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/BenjaminVanRyseghem/switchless-redux-actions/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/BenjaminVanRyseghem/switchless-redux-actions/statuses/09365c49c0eb1a54aa0c079ca59421bb393d48d9"}},"author_association":"NONE"}}
{"actor":{"display_login":"BenjaminVanRyseghem"}}