{"action":"created","comment":{"url":"https://api.github.com/repos/adamterlson/backbone-redux-store/pulls/comments/75581939","id":75581939,"diff_hunk":"@@ -103,12 +128,32 @@ export const createStore = (reducer, initialState, enhancer) => {\n  * @returns {Function} - A function that expects two arguments: an Object of key/value pairs where the values are\n  *                       Backbone entities, and an optional store enhancer. Returns a store.\n  */\n-export const bbCreateStore = (storeCreator = createStore) => (backboneEntities, enhancer = noop) => {\n-    const combinedBBEntities = bbCombineEntities(backboneEntities);\n+export const bbCreateStore = (storeCreator = createStore) => (bbEntityOrReducer, enhancer = noop) => {\n+    let bbReturningReducer;\n+    let combinedBBEntities;\n+    let passedBBEntity = typeof bbEntityOrReducer !== 'function';","path":"lib/index.js","position":97,"original_position":97,"commit_id":"6405c1fd44311b72ff41daabea06bba4de6664a2","original_commit_id":"6405c1fd44311b72ff41daabea06bba4de6664a2","user":{"login":"adamterlson","id":2498418,"avatar_url":"https://avatars.githubusercontent.com/u/2498418?v=3","gravatar_id":"","url":"https://api.github.com/users/adamterlson","html_url":"https://github.com/adamterlson","followers_url":"https://api.github.com/users/adamterlson/followers","following_url":"https://api.github.com/users/adamterlson/following{/other_user}","gists_url":"https://api.github.com/users/adamterlson/gists{/gist_id}","starred_url":"https://api.github.com/users/adamterlson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamterlson/subscriptions","organizations_url":"https://api.github.com/users/adamterlson/orgs","repos_url":"https://api.github.com/users/adamterlson/repos","events_url":"https://api.github.com/users/adamterlson/events{/privacy}","received_events_url":"https://api.github.com/users/adamterlson/received_events","type":"User","site_admin":false},"body":"I'm open to be convinced on the API usage, but the goal was to create a way\nthat you can update an existing model/collection without actually modifying\nit.  It's the middle-layer thing that responds to the redux actions without\nhaving to handle all of them internally to the bb entity.\n\nDo you not feel that would be something someone would like to do?  I would\nagree, however, that it is not the primary/basic usage.\n\nOn Fri, Aug 19, 2016 at 5:22 PM, Vitor Balocco <notifications@github.com>\nwrote:\n\n> In lib/index.js\n> <https://github.com/adamterlson/backbone-redux-store/pull/6#discussion_r75559864>\n> :\n>\n> > @@ -103,12 +128,32 @@ export const createStore = (reducer, initialState, enhancer) => {\n> >   * @returns {Function} - A function that expects two arguments: an Object of key/value pairs where the values are\n> >   *                       Backbone entities, and an optional store enhancer. Returns a store.\n> >   */\n> > -export const bbCreateStore = (storeCreator = createStore) => (backboneEntities, enhancer = noop) => {\n> > -    const combinedBBEntities = bbCombineEntities(backboneEntities);\n> > +export const bbCreateStore = (storeCreator = createStore) => (bbEntityOrReducer, enhancer = noop) => {\n> > +    let bbReturningReducer;\n> > +    let combinedBBEntities;\n> > +    let passedBBEntity = typeof bbEntityOrReducer !== 'function';\n>\n> This can be const since you never reassign it\n>\n> —\n> You are receiving this because you authored the thread.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/adamterlson/backbone-redux-store/pull/6/files/6405c1fd44311b72ff41daabea06bba4de6664a2#r75559864>,\n> or mute the thread\n> <https://github.com/notifications/unsubscribe-auth/ACYfcvSaWt4YxZm4ThKyQbb_D5N03v3fks5qhiyKgaJpZM4Jo4YV>\n> .\n>\n","created_at":"2016-08-20T17:17:18Z","updated_at":"2016-08-20T17:17:18Z","html_url":"https://github.com/adamterlson/backbone-redux-store/pull/6#discussion_r75581939","pull_request_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/pulls/6","_links":{"self":{"href":"https://api.github.com/repos/adamterlson/backbone-redux-store/pulls/comments/75581939"},"html":{"href":"https://github.com/adamterlson/backbone-redux-store/pull/6#discussion_r75581939"},"pull_request":{"href":"https://api.github.com/repos/adamterlson/backbone-redux-store/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/adamterlson/backbone-redux-store/pulls/6","id":82050439,"html_url":"https://github.com/adamterlson/backbone-redux-store/pull/6","diff_url":"https://github.com/adamterlson/backbone-redux-store/pull/6.diff","patch_url":"https://github.com/adamterlson/backbone-redux-store/pull/6.patch","issue_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/issues/6","number":6,"state":"open","locked":false,"title":"Reducer api","user":{"login":"adamterlson","id":2498418,"avatar_url":"https://avatars.githubusercontent.com/u/2498418?v=3","gravatar_id":"","url":"https://api.github.com/users/adamterlson","html_url":"https://github.com/adamterlson","followers_url":"https://api.github.com/users/adamterlson/followers","following_url":"https://api.github.com/users/adamterlson/following{/other_user}","gists_url":"https://api.github.com/users/adamterlson/gists{/gist_id}","starred_url":"https://api.github.com/users/adamterlson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamterlson/subscriptions","organizations_url":"https://api.github.com/users/adamterlson/orgs","repos_url":"https://api.github.com/users/adamterlson/repos","events_url":"https://api.github.com/users/adamterlson/events{/privacy}","received_events_url":"https://api.github.com/users/adamterlson/received_events","type":"User","site_admin":false},"body":"Add support for using bbCreateStore with a reducer instead of a backbone entity.  Still need to update the docs, but could use some feedback to keep things moving.","created_at":"2016-08-19T21:45:00Z","updated_at":"2016-08-20T17:17:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9f5cdff4c8b30b8a4049aa7d3814cfa661eddbe0","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/pulls/6/commits","review_comments_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/pulls/6/comments","review_comment_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/pulls/comments{/number}","comments_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/issues/6/comments","statuses_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/statuses/6405c1fd44311b72ff41daabea06bba4de6664a2","head":{"label":"adamterlson:reducer-api","ref":"reducer-api","sha":"6405c1fd44311b72ff41daabea06bba4de6664a2","user":{"login":"adamterlson","id":2498418,"avatar_url":"https://avatars.githubusercontent.com/u/2498418?v=3","gravatar_id":"","url":"https://api.github.com/users/adamterlson","html_url":"https://github.com/adamterlson","followers_url":"https://api.github.com/users/adamterlson/followers","following_url":"https://api.github.com/users/adamterlson/following{/other_user}","gists_url":"https://api.github.com/users/adamterlson/gists{/gist_id}","starred_url":"https://api.github.com/users/adamterlson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamterlson/subscriptions","organizations_url":"https://api.github.com/users/adamterlson/orgs","repos_url":"https://api.github.com/users/adamterlson/repos","events_url":"https://api.github.com/users/adamterlson/events{/privacy}","received_events_url":"https://api.github.com/users/adamterlson/received_events","type":"User","site_admin":false},"repo":{"id":64699396,"name":"backbone-redux-store","full_name":"adamterlson/backbone-redux-store","owner":{"login":"adamterlson","id":2498418,"avatar_url":"https://avatars.githubusercontent.com/u/2498418?v=3","gravatar_id":"","url":"https://api.github.com/users/adamterlson","html_url":"https://github.com/adamterlson","followers_url":"https://api.github.com/users/adamterlson/followers","following_url":"https://api.github.com/users/adamterlson/following{/other_user}","gists_url":"https://api.github.com/users/adamterlson/gists{/gist_id}","starred_url":"https://api.github.com/users/adamterlson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamterlson/subscriptions","organizations_url":"https://api.github.com/users/adamterlson/orgs","repos_url":"https://api.github.com/users/adamterlson/repos","events_url":"https://api.github.com/users/adamterlson/events{/privacy}","received_events_url":"https://api.github.com/users/adamterlson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/adamterlson/backbone-redux-store","description":"Redux store API for your Backbone Models and Collections. Works with or without Redux.","fork":false,"url":"https://api.github.com/repos/adamterlson/backbone-redux-store","forks_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/forks","keys_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/keys{/key_id}","collaborators_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/teams","hooks_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/hooks","issue_events_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/issues/events{/number}","events_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/events","assignees_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/assignees{/user}","branches_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/branches{/branch}","tags_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/tags","blobs_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/git/refs{/sha}","trees_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/git/trees{/sha}","statuses_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/statuses/{sha}","languages_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/languages","stargazers_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/stargazers","contributors_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/contributors","subscribers_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/subscribers","subscription_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/subscription","commits_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/commits{/sha}","git_commits_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/git/commits{/sha}","comments_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/comments{/number}","issue_comment_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/issues/comments{/number}","contents_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/contents/{+path}","compare_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/compare/{base}...{head}","merges_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/merges","archive_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/downloads","issues_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/issues{/number}","pulls_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/pulls{/number}","milestones_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/milestones{/number}","notifications_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/labels{/name}","releases_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/releases{/id}","deployments_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/deployments","created_at":"2016-08-01T20:30:11Z","updated_at":"2016-08-10T14:50:58Z","pushed_at":"2016-08-19T21:45:00Z","git_url":"git://github.com/adamterlson/backbone-redux-store.git","ssh_url":"git@github.com:adamterlson/backbone-redux-store.git","clone_url":"https://github.com/adamterlson/backbone-redux-store.git","svn_url":"https://github.com/adamterlson/backbone-redux-store","homepage":"","size":239,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":2,"default_branch":"master"}},"base":{"label":"adamterlson:master","ref":"master","sha":"a44a0f2f05ae6bfd9cbece97646d951a181dd296","user":{"login":"adamterlson","id":2498418,"avatar_url":"https://avatars.githubusercontent.com/u/2498418?v=3","gravatar_id":"","url":"https://api.github.com/users/adamterlson","html_url":"https://github.com/adamterlson","followers_url":"https://api.github.com/users/adamterlson/followers","following_url":"https://api.github.com/users/adamterlson/following{/other_user}","gists_url":"https://api.github.com/users/adamterlson/gists{/gist_id}","starred_url":"https://api.github.com/users/adamterlson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamterlson/subscriptions","organizations_url":"https://api.github.com/users/adamterlson/orgs","repos_url":"https://api.github.com/users/adamterlson/repos","events_url":"https://api.github.com/users/adamterlson/events{/privacy}","received_events_url":"https://api.github.com/users/adamterlson/received_events","type":"User","site_admin":false},"repo":{"id":64699396,"name":"backbone-redux-store","full_name":"adamterlson/backbone-redux-store","owner":{"login":"adamterlson","id":2498418,"avatar_url":"https://avatars.githubusercontent.com/u/2498418?v=3","gravatar_id":"","url":"https://api.github.com/users/adamterlson","html_url":"https://github.com/adamterlson","followers_url":"https://api.github.com/users/adamterlson/followers","following_url":"https://api.github.com/users/adamterlson/following{/other_user}","gists_url":"https://api.github.com/users/adamterlson/gists{/gist_id}","starred_url":"https://api.github.com/users/adamterlson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamterlson/subscriptions","organizations_url":"https://api.github.com/users/adamterlson/orgs","repos_url":"https://api.github.com/users/adamterlson/repos","events_url":"https://api.github.com/users/adamterlson/events{/privacy}","received_events_url":"https://api.github.com/users/adamterlson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/adamterlson/backbone-redux-store","description":"Redux store API for your Backbone Models and Collections. Works with or without Redux.","fork":false,"url":"https://api.github.com/repos/adamterlson/backbone-redux-store","forks_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/forks","keys_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/keys{/key_id}","collaborators_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/teams","hooks_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/hooks","issue_events_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/issues/events{/number}","events_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/events","assignees_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/assignees{/user}","branches_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/branches{/branch}","tags_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/tags","blobs_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/git/refs{/sha}","trees_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/git/trees{/sha}","statuses_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/statuses/{sha}","languages_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/languages","stargazers_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/stargazers","contributors_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/contributors","subscribers_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/subscribers","subscription_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/subscription","commits_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/commits{/sha}","git_commits_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/git/commits{/sha}","comments_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/comments{/number}","issue_comment_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/issues/comments{/number}","contents_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/contents/{+path}","compare_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/compare/{base}...{head}","merges_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/merges","archive_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/downloads","issues_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/issues{/number}","pulls_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/pulls{/number}","milestones_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/milestones{/number}","notifications_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/labels{/name}","releases_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/releases{/id}","deployments_url":"https://api.github.com/repos/adamterlson/backbone-redux-store/deployments","created_at":"2016-08-01T20:30:11Z","updated_at":"2016-08-10T14:50:58Z","pushed_at":"2016-08-19T21:45:00Z","git_url":"git://github.com/adamterlson/backbone-redux-store.git","ssh_url":"git@github.com:adamterlson/backbone-redux-store.git","clone_url":"https://github.com/adamterlson/backbone-redux-store.git","svn_url":"https://github.com/adamterlson/backbone-redux-store","homepage":"","size":239,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/adamterlson/backbone-redux-store/pulls/6"},"html":{"href":"https://github.com/adamterlson/backbone-redux-store/pull/6"},"issue":{"href":"https://api.github.com/repos/adamterlson/backbone-redux-store/issues/6"},"comments":{"href":"https://api.github.com/repos/adamterlson/backbone-redux-store/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/adamterlson/backbone-redux-store/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/adamterlson/backbone-redux-store/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/adamterlson/backbone-redux-store/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/adamterlson/backbone-redux-store/statuses/6405c1fd44311b72ff41daabea06bba4de6664a2"}}}}
{"actor":{"display_login":"adamterlson"}}