{"action":"created","comment":{"url":"https://api.github.com/repos/faassen/reselect/pulls/comments/39413386","id":39413386,"diff_hunk":"@@ -189,4 +189,40 @@ suite('selector', () => {\n         assert.equal(memoized('A'), 'A');\n         assert.equal(called, 2);\n     });\n+    test(\"composing selectors\", function() {\n+        const selector = composeSelectors({\n+              x: state => state.a,\n+              y: state => state.b\n+        });\n+\n+        let firstResult = selector({a: 1,b: 2});\n+        assert.deepEqual( firstResult, {x: 1, y: 2});\n+        assert.strictEqual(selector({a: 1,b: 2}), firstResult);\n+        assert.notStrictEqual(selector({a: 2,b: 2}),firstResult);\n+        assert.notEqual(selector({a: 2,b: 2}), firstResult);\n+        assert.deepEqual(selector({a: 2,b: 2}), {x: 2,y: 2});\n+    });\n+    test(\"composing selectors with custom selector creator\", function() {\n+        let customEqualityFunctionCalls = 0;\n+        const customSelectorCreator = createSelectorCreator(\n+            defaultMemoize,\n+            (a,b) => {\n+                ++customEqualityFunctionCalls;\n+                return JSON.stringify(a) == JSON.stringify(b)\n+            }\n+        );\n+        const selector = composeSelectors({\n+              x: state => state.a,\n+              y: state => state.b\n+        }, customSelectorCreator );\n+\n+        let firstResult = selector({a: 1,b: 2});\n+        assert.deepEqual( firstResult, {x: 1, y: 2});\n+        assert.strictEqual(selector({a: 1,b: 2}), firstResult);\n+        assert.notStrictEqual(selector({a: 2,b: 2}),firstResult);\n+        assert.notEqual(selector({a: 2,b: 2}), firstResult);\n+        assert.deepEqual(selector({a: 2,b: 2}), {x: 2,y: 2});\n+","path":"test/test_selector.js","position":46,"original_position":46,"commit_id":"580074ca6d3adf330af81d69b5e32656b93cc8a2","original_commit_id":"580074ca6d3adf330af81d69b5e32656b93cc8a2","user":{"login":"PSpSynedra","id":13317766,"avatar_url":"https://avatars.githubusercontent.com/u/13317766?v=3","gravatar_id":"","url":"https://api.github.com/users/PSpSynedra","html_url":"https://github.com/PSpSynedra","followers_url":"https://api.github.com/users/PSpSynedra/followers","following_url":"https://api.github.com/users/PSpSynedra/following{/other_user}","gists_url":"https://api.github.com/users/PSpSynedra/gists{/gist_id}","starred_url":"https://api.github.com/users/PSpSynedra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PSpSynedra/subscriptions","organizations_url":"https://api.github.com/users/PSpSynedra/orgs","repos_url":"https://api.github.com/users/PSpSynedra/repos","events_url":"https://api.github.com/users/PSpSynedra/events{/privacy}","received_events_url":"https://api.github.com/users/PSpSynedra/received_events","type":"User","site_admin":false},"body":"That's right, these two checks are not necessary as you pointed out correctly. I will simply remove them.","created_at":"2015-09-14T16:15:57Z","updated_at":"2015-09-14T16:15:57Z","html_url":"https://github.com/faassen/reselect/pull/46#discussion_r39413386","pull_request_url":"https://api.github.com/repos/faassen/reselect/pulls/46","_links":{"self":{"href":"https://api.github.com/repos/faassen/reselect/pulls/comments/39413386"},"html":{"href":"https://github.com/faassen/reselect/pull/46#discussion_r39413386"},"pull_request":{"href":"https://api.github.com/repos/faassen/reselect/pulls/46"}}},"pull_request":{"url":"https://api.github.com/repos/faassen/reselect/pulls/46","id":44766140,"html_url":"https://github.com/faassen/reselect/pull/46","diff_url":"https://github.com/faassen/reselect/pull/46.diff","patch_url":"https://github.com/faassen/reselect/pull/46.patch","issue_url":"https://api.github.com/repos/faassen/reselect/issues/46","number":46,"state":"open","locked":false,"title":"Added support for mapping selectors","user":{"login":"PSpSynedra","id":13317766,"avatar_url":"https://avatars.githubusercontent.com/u/13317766?v=3","gravatar_id":"","url":"https://api.github.com/users/PSpSynedra","html_url":"https://github.com/PSpSynedra","followers_url":"https://api.github.com/users/PSpSynedra/followers","following_url":"https://api.github.com/users/PSpSynedra/following{/other_user}","gists_url":"https://api.github.com/users/PSpSynedra/gists{/gist_id}","starred_url":"https://api.github.com/users/PSpSynedra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PSpSynedra/subscriptions","organizations_url":"https://api.github.com/users/PSpSynedra/orgs","repos_url":"https://api.github.com/users/PSpSynedra/repos","events_url":"https://api.github.com/users/PSpSynedra/events{/privacy}","received_events_url":"https://api.github.com/users/PSpSynedra/received_events","type":"User","site_admin":false},"body":"Adds the `composeSelectors` API-Function to create mapping selectors.","created_at":"2015-09-11T10:10:40Z","updated_at":"2015-09-14T16:15:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0cb747fbe87618b36c56dfd087560b95b053976c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/faassen/reselect/pulls/46/commits","review_comments_url":"https://api.github.com/repos/faassen/reselect/pulls/46/comments","review_comment_url":"https://api.github.com/repos/faassen/reselect/pulls/comments{/number}","comments_url":"https://api.github.com/repos/faassen/reselect/issues/46/comments","statuses_url":"https://api.github.com/repos/faassen/reselect/statuses/580074ca6d3adf330af81d69b5e32656b93cc8a2","head":{"label":"PSpSynedra:extending-selector-creators","ref":"extending-selector-creators","sha":"580074ca6d3adf330af81d69b5e32656b93cc8a2","user":{"login":"PSpSynedra","id":13317766,"avatar_url":"https://avatars.githubusercontent.com/u/13317766?v=3","gravatar_id":"","url":"https://api.github.com/users/PSpSynedra","html_url":"https://github.com/PSpSynedra","followers_url":"https://api.github.com/users/PSpSynedra/followers","following_url":"https://api.github.com/users/PSpSynedra/following{/other_user}","gists_url":"https://api.github.com/users/PSpSynedra/gists{/gist_id}","starred_url":"https://api.github.com/users/PSpSynedra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PSpSynedra/subscriptions","organizations_url":"https://api.github.com/users/PSpSynedra/orgs","repos_url":"https://api.github.com/users/PSpSynedra/repos","events_url":"https://api.github.com/users/PSpSynedra/events{/privacy}","received_events_url":"https://api.github.com/users/PSpSynedra/received_events","type":"User","site_admin":false},"repo":{"id":39202487,"name":"reselect","full_name":"PSpSynedra/reselect","owner":{"login":"PSpSynedra","id":13317766,"avatar_url":"https://avatars.githubusercontent.com/u/13317766?v=3","gravatar_id":"","url":"https://api.github.com/users/PSpSynedra","html_url":"https://github.com/PSpSynedra","followers_url":"https://api.github.com/users/PSpSynedra/followers","following_url":"https://api.github.com/users/PSpSynedra/following{/other_user}","gists_url":"https://api.github.com/users/PSpSynedra/gists{/gist_id}","starred_url":"https://api.github.com/users/PSpSynedra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PSpSynedra/subscriptions","organizations_url":"https://api.github.com/users/PSpSynedra/orgs","repos_url":"https://api.github.com/users/PSpSynedra/repos","events_url":"https://api.github.com/users/PSpSynedra/events{/privacy}","received_events_url":"https://api.github.com/users/PSpSynedra/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/PSpSynedra/reselect","description":"Selector library for Redux","fork":true,"url":"https://api.github.com/repos/PSpSynedra/reselect","forks_url":"https://api.github.com/repos/PSpSynedra/reselect/forks","keys_url":"https://api.github.com/repos/PSpSynedra/reselect/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PSpSynedra/reselect/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PSpSynedra/reselect/teams","hooks_url":"https://api.github.com/repos/PSpSynedra/reselect/hooks","issue_events_url":"https://api.github.com/repos/PSpSynedra/reselect/issues/events{/number}","events_url":"https://api.github.com/repos/PSpSynedra/reselect/events","assignees_url":"https://api.github.com/repos/PSpSynedra/reselect/assignees{/user}","branches_url":"https://api.github.com/repos/PSpSynedra/reselect/branches{/branch}","tags_url":"https://api.github.com/repos/PSpSynedra/reselect/tags","blobs_url":"https://api.github.com/repos/PSpSynedra/reselect/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PSpSynedra/reselect/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PSpSynedra/reselect/git/refs{/sha}","trees_url":"https://api.github.com/repos/PSpSynedra/reselect/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PSpSynedra/reselect/statuses/{sha}","languages_url":"https://api.github.com/repos/PSpSynedra/reselect/languages","stargazers_url":"https://api.github.com/repos/PSpSynedra/reselect/stargazers","contributors_url":"https://api.github.com/repos/PSpSynedra/reselect/contributors","subscribers_url":"https://api.github.com/repos/PSpSynedra/reselect/subscribers","subscription_url":"https://api.github.com/repos/PSpSynedra/reselect/subscription","commits_url":"https://api.github.com/repos/PSpSynedra/reselect/commits{/sha}","git_commits_url":"https://api.github.com/repos/PSpSynedra/reselect/git/commits{/sha}","comments_url":"https://api.github.com/repos/PSpSynedra/reselect/comments{/number}","issue_comment_url":"https://api.github.com/repos/PSpSynedra/reselect/issues/comments{/number}","contents_url":"https://api.github.com/repos/PSpSynedra/reselect/contents/{+path}","compare_url":"https://api.github.com/repos/PSpSynedra/reselect/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PSpSynedra/reselect/merges","archive_url":"https://api.github.com/repos/PSpSynedra/reselect/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PSpSynedra/reselect/downloads","issues_url":"https://api.github.com/repos/PSpSynedra/reselect/issues{/number}","pulls_url":"https://api.github.com/repos/PSpSynedra/reselect/pulls{/number}","milestones_url":"https://api.github.com/repos/PSpSynedra/reselect/milestones{/number}","notifications_url":"https://api.github.com/repos/PSpSynedra/reselect/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PSpSynedra/reselect/labels{/name}","releases_url":"https://api.github.com/repos/PSpSynedra/reselect/releases{/id}","created_at":"2015-07-16T14:43:59Z","updated_at":"2015-07-16T14:44:00Z","pushed_at":"2015-09-11T10:06:37Z","git_url":"git://github.com/PSpSynedra/reselect.git","ssh_url":"git@github.com:PSpSynedra/reselect.git","clone_url":"https://github.com/PSpSynedra/reselect.git","svn_url":"https://github.com/PSpSynedra/reselect","homepage":null,"size":258,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"faassen:master","ref":"master","sha":"58a96b3c8cd72dd232b1c50a85b93f40faa54e76","user":{"login":"faassen","id":327472,"avatar_url":"https://avatars.githubusercontent.com/u/327472?v=3","gravatar_id":"","url":"https://api.github.com/users/faassen","html_url":"https://github.com/faassen","followers_url":"https://api.github.com/users/faassen/followers","following_url":"https://api.github.com/users/faassen/following{/other_user}","gists_url":"https://api.github.com/users/faassen/gists{/gist_id}","starred_url":"https://api.github.com/users/faassen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/faassen/subscriptions","organizations_url":"https://api.github.com/users/faassen/orgs","repos_url":"https://api.github.com/users/faassen/repos","events_url":"https://api.github.com/users/faassen/events{/privacy}","received_events_url":"https://api.github.com/users/faassen/received_events","type":"User","site_admin":false},"repo":{"id":38366638,"name":"reselect","full_name":"faassen/reselect","owner":{"login":"faassen","id":327472,"avatar_url":"https://avatars.githubusercontent.com/u/327472?v=3","gravatar_id":"","url":"https://api.github.com/users/faassen","html_url":"https://github.com/faassen","followers_url":"https://api.github.com/users/faassen/followers","following_url":"https://api.github.com/users/faassen/following{/other_user}","gists_url":"https://api.github.com/users/faassen/gists{/gist_id}","starred_url":"https://api.github.com/users/faassen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/faassen/subscriptions","organizations_url":"https://api.github.com/users/faassen/orgs","repos_url":"https://api.github.com/users/faassen/repos","events_url":"https://api.github.com/users/faassen/events{/privacy}","received_events_url":"https://api.github.com/users/faassen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/faassen/reselect","description":"Selector library for Redux","fork":false,"url":"https://api.github.com/repos/faassen/reselect","forks_url":"https://api.github.com/repos/faassen/reselect/forks","keys_url":"https://api.github.com/repos/faassen/reselect/keys{/key_id}","collaborators_url":"https://api.github.com/repos/faassen/reselect/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/faassen/reselect/teams","hooks_url":"https://api.github.com/repos/faassen/reselect/hooks","issue_events_url":"https://api.github.com/repos/faassen/reselect/issues/events{/number}","events_url":"https://api.github.com/repos/faassen/reselect/events","assignees_url":"https://api.github.com/repos/faassen/reselect/assignees{/user}","branches_url":"https://api.github.com/repos/faassen/reselect/branches{/branch}","tags_url":"https://api.github.com/repos/faassen/reselect/tags","blobs_url":"https://api.github.com/repos/faassen/reselect/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/faassen/reselect/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/faassen/reselect/git/refs{/sha}","trees_url":"https://api.github.com/repos/faassen/reselect/git/trees{/sha}","statuses_url":"https://api.github.com/repos/faassen/reselect/statuses/{sha}","languages_url":"https://api.github.com/repos/faassen/reselect/languages","stargazers_url":"https://api.github.com/repos/faassen/reselect/stargazers","contributors_url":"https://api.github.com/repos/faassen/reselect/contributors","subscribers_url":"https://api.github.com/repos/faassen/reselect/subscribers","subscription_url":"https://api.github.com/repos/faassen/reselect/subscription","commits_url":"https://api.github.com/repos/faassen/reselect/commits{/sha}","git_commits_url":"https://api.github.com/repos/faassen/reselect/git/commits{/sha}","comments_url":"https://api.github.com/repos/faassen/reselect/comments{/number}","issue_comment_url":"https://api.github.com/repos/faassen/reselect/issues/comments{/number}","contents_url":"https://api.github.com/repos/faassen/reselect/contents/{+path}","compare_url":"https://api.github.com/repos/faassen/reselect/compare/{base}...{head}","merges_url":"https://api.github.com/repos/faassen/reselect/merges","archive_url":"https://api.github.com/repos/faassen/reselect/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/faassen/reselect/downloads","issues_url":"https://api.github.com/repos/faassen/reselect/issues{/number}","pulls_url":"https://api.github.com/repos/faassen/reselect/pulls{/number}","milestones_url":"https://api.github.com/repos/faassen/reselect/milestones{/number}","notifications_url":"https://api.github.com/repos/faassen/reselect/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/faassen/reselect/labels{/name}","releases_url":"https://api.github.com/repos/faassen/reselect/releases{/id}","created_at":"2015-07-01T11:06:45Z","updated_at":"2015-09-14T15:25:52Z","pushed_at":"2015-09-11T10:10:41Z","git_url":"git://github.com/faassen/reselect.git","ssh_url":"git@github.com:faassen/reselect.git","clone_url":"https://github.com/faassen/reselect.git","svn_url":"https://github.com/faassen/reselect","homepage":null,"size":658,"stargazers_count":467,"watchers_count":467,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"open_issues_count":9,"forks":15,"open_issues":9,"watchers":467,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/faassen/reselect/pulls/46"},"html":{"href":"https://github.com/faassen/reselect/pull/46"},"issue":{"href":"https://api.github.com/repos/faassen/reselect/issues/46"},"comments":{"href":"https://api.github.com/repos/faassen/reselect/issues/46/comments"},"review_comments":{"href":"https://api.github.com/repos/faassen/reselect/pulls/46/comments"},"review_comment":{"href":"https://api.github.com/repos/faassen/reselect/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/faassen/reselect/pulls/46/commits"},"statuses":{"href":"https://api.github.com/repos/faassen/reselect/statuses/580074ca6d3adf330af81d69b5e32656b93cc8a2"}}}}