{"action":"created","comment":{"url":"https://api.github.com/repos/emberjs/ember.js/pulls/comments/51367207","id":51367207,"diff_hunk":"@@ -108,6 +108,20 @@ QUnit.test('should apply Ember.Array to return value of uniq', function() {\n   equal(EmberArray.detect(y), true, 'should have mixin applied');\n });\n \n+QUnit.test('uniqBy', function() {","path":"packages/ember-runtime/tests/mixins/enumerable_test.js","position":4,"original_position":4,"commit_id":"3dfb8e6824040c8417210515cb364aef700ee53d","original_commit_id":"3dfb8e6824040c8417210515cb364aef700ee53d","user":{"login":"rwjblue","id":12637,"avatar_url":"https://avatars.githubusercontent.com/u/12637?v=3","gravatar_id":"","url":"https://api.github.com/users/rwjblue","html_url":"https://github.com/rwjblue","followers_url":"https://api.github.com/users/rwjblue/followers","following_url":"https://api.github.com/users/rwjblue/following{/other_user}","gists_url":"https://api.github.com/users/rwjblue/gists{/gist_id}","starred_url":"https://api.github.com/users/rwjblue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rwjblue/subscriptions","organizations_url":"https://api.github.com/users/rwjblue/orgs","repos_url":"https://api.github.com/users/rwjblue/repos","events_url":"https://api.github.com/users/rwjblue/events{/privacy}","received_events_url":"https://api.github.com/users/rwjblue/received_events","type":"User","site_admin":false},"body":"These two tests should be wrapped in an `if (isEnabled('ember-runtime-computed-uniq-by')) { }`","created_at":"2016-01-31T20:55:17Z","updated_at":"2016-01-31T20:55:17Z","html_url":"https://github.com/emberjs/ember.js/pull/12875#discussion_r51367207","pull_request_url":"https://api.github.com/repos/emberjs/ember.js/pulls/12875","_links":{"self":{"href":"https://api.github.com/repos/emberjs/ember.js/pulls/comments/51367207"},"html":{"href":"https://github.com/emberjs/ember.js/pull/12875#discussion_r51367207"},"pull_request":{"href":"https://api.github.com/repos/emberjs/ember.js/pulls/12875"}}},"pull_request":{"url":"https://api.github.com/repos/emberjs/ember.js/pulls/12875","id":57719639,"html_url":"https://github.com/emberjs/ember.js/pull/12875","diff_url":"https://github.com/emberjs/ember.js/pull/12875.diff","patch_url":"https://github.com/emberjs/ember.js/pull/12875.patch","issue_url":"https://api.github.com/repos/emberjs/ember.js/issues/12875","number":12875,"state":"open","locked":false,"title":"[FEATURE uniqBy] Adds Enumerable.uniqBy and Computed.uniqBy","user":{"login":"seanjohnson08","id":1444384,"avatar_url":"https://avatars.githubusercontent.com/u/1444384?v=3","gravatar_id":"","url":"https://api.github.com/users/seanjohnson08","html_url":"https://github.com/seanjohnson08","followers_url":"https://api.github.com/users/seanjohnson08/followers","following_url":"https://api.github.com/users/seanjohnson08/following{/other_user}","gists_url":"https://api.github.com/users/seanjohnson08/gists{/gist_id}","starred_url":"https://api.github.com/users/seanjohnson08/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seanjohnson08/subscriptions","organizations_url":"https://api.github.com/users/seanjohnson08/orgs","repos_url":"https://api.github.com/users/seanjohnson08/repos","events_url":"https://api.github.com/users/seanjohnson08/events{/privacy}","received_events_url":"https://api.github.com/users/seanjohnson08/received_events","type":"User","site_admin":false},"body":"ORIGINAL PR: https://github.com/emberjs/ember.js/pull/12758\r\n\r\nAlmost all of the enumerable methods that serve to produce some new result from a list follow the following pattern:\r\n\r\nEnumerate by object | Enumerate by object property\r\n------------ | -------------\r\n`filter` | `filterBy`\r\n`map` | `mapBy`\r\n`find` | `findBy`\r\n`reject` | `rejectBy`\r\n`uniq` | ????\r\n\r\nExcept `uniq`! My proposal is to add a `uniqBy` method to both the `Enumerable` class and to the computed reduce macros to allow the user to reduce a list down to its unique values given some key. A prime example is if I'm dealing with a list of records, or objects returned that have a primary key:\r\n\r\n```var records = Ember.A([\r\n{id: 1, name: 'Adam' },\r\n{id: 2, name: 'Eve' },\r\n{id: 1, name: 'Adam'}\r\n]);```\r\n\r\nIf I wanted to remove the duplicate records, I would then be able to use the result of `records.uniqBy('id')` to get a list of just the unique records in the list.\r\n\r\nThis would not alter or modify the existing `uniq` methods, it would just serve to fill in a blank.","created_at":"2016-01-29T23:56:46Z","updated_at":"2016-01-31T20:55:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8c0a275f81d08ec76a3876fb958433125ffb68dd","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/emberjs/ember.js/pulls/12875/commits","review_comments_url":"https://api.github.com/repos/emberjs/ember.js/pulls/12875/comments","review_comment_url":"https://api.github.com/repos/emberjs/ember.js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/emberjs/ember.js/issues/12875/comments","statuses_url":"https://api.github.com/repos/emberjs/ember.js/statuses/3dfb8e6824040c8417210515cb364aef700ee53d","head":{"label":"seanjohnson08:master","ref":"master","sha":"3dfb8e6824040c8417210515cb364aef700ee53d","user":{"login":"seanjohnson08","id":1444384,"avatar_url":"https://avatars.githubusercontent.com/u/1444384?v=3","gravatar_id":"","url":"https://api.github.com/users/seanjohnson08","html_url":"https://github.com/seanjohnson08","followers_url":"https://api.github.com/users/seanjohnson08/followers","following_url":"https://api.github.com/users/seanjohnson08/following{/other_user}","gists_url":"https://api.github.com/users/seanjohnson08/gists{/gist_id}","starred_url":"https://api.github.com/users/seanjohnson08/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seanjohnson08/subscriptions","organizations_url":"https://api.github.com/users/seanjohnson08/orgs","repos_url":"https://api.github.com/users/seanjohnson08/repos","events_url":"https://api.github.com/users/seanjohnson08/events{/privacy}","received_events_url":"https://api.github.com/users/seanjohnson08/received_events","type":"User","site_admin":false},"repo":{"id":48664708,"name":"ember.js","full_name":"seanjohnson08/ember.js","owner":{"login":"seanjohnson08","id":1444384,"avatar_url":"https://avatars.githubusercontent.com/u/1444384?v=3","gravatar_id":"","url":"https://api.github.com/users/seanjohnson08","html_url":"https://github.com/seanjohnson08","followers_url":"https://api.github.com/users/seanjohnson08/followers","following_url":"https://api.github.com/users/seanjohnson08/following{/other_user}","gists_url":"https://api.github.com/users/seanjohnson08/gists{/gist_id}","starred_url":"https://api.github.com/users/seanjohnson08/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seanjohnson08/subscriptions","organizations_url":"https://api.github.com/users/seanjohnson08/orgs","repos_url":"https://api.github.com/users/seanjohnson08/repos","events_url":"https://api.github.com/users/seanjohnson08/events{/privacy}","received_events_url":"https://api.github.com/users/seanjohnson08/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/seanjohnson08/ember.js","description":"Ember.js - A JavaScript framework for creating ambitious web applications","fork":true,"url":"https://api.github.com/repos/seanjohnson08/ember.js","forks_url":"https://api.github.com/repos/seanjohnson08/ember.js/forks","keys_url":"https://api.github.com/repos/seanjohnson08/ember.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/seanjohnson08/ember.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/seanjohnson08/ember.js/teams","hooks_url":"https://api.github.com/repos/seanjohnson08/ember.js/hooks","issue_events_url":"https://api.github.com/repos/seanjohnson08/ember.js/issues/events{/number}","events_url":"https://api.github.com/repos/seanjohnson08/ember.js/events","assignees_url":"https://api.github.com/repos/seanjohnson08/ember.js/assignees{/user}","branches_url":"https://api.github.com/repos/seanjohnson08/ember.js/branches{/branch}","tags_url":"https://api.github.com/repos/seanjohnson08/ember.js/tags","blobs_url":"https://api.github.com/repos/seanjohnson08/ember.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/seanjohnson08/ember.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/seanjohnson08/ember.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/seanjohnson08/ember.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/seanjohnson08/ember.js/statuses/{sha}","languages_url":"https://api.github.com/repos/seanjohnson08/ember.js/languages","stargazers_url":"https://api.github.com/repos/seanjohnson08/ember.js/stargazers","contributors_url":"https://api.github.com/repos/seanjohnson08/ember.js/contributors","subscribers_url":"https://api.github.com/repos/seanjohnson08/ember.js/subscribers","subscription_url":"https://api.github.com/repos/seanjohnson08/ember.js/subscription","commits_url":"https://api.github.com/repos/seanjohnson08/ember.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/seanjohnson08/ember.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/seanjohnson08/ember.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/seanjohnson08/ember.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/seanjohnson08/ember.js/contents/{+path}","compare_url":"https://api.github.com/repos/seanjohnson08/ember.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/seanjohnson08/ember.js/merges","archive_url":"https://api.github.com/repos/seanjohnson08/ember.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/seanjohnson08/ember.js/downloads","issues_url":"https://api.github.com/repos/seanjohnson08/ember.js/issues{/number}","pulls_url":"https://api.github.com/repos/seanjohnson08/ember.js/pulls{/number}","milestones_url":"https://api.github.com/repos/seanjohnson08/ember.js/milestones{/number}","notifications_url":"https://api.github.com/repos/seanjohnson08/ember.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/seanjohnson08/ember.js/labels{/name}","releases_url":"https://api.github.com/repos/seanjohnson08/ember.js/releases{/id}","deployments_url":"https://api.github.com/repos/seanjohnson08/ember.js/deployments","created_at":"2015-12-27T23:38:14Z","updated_at":"2016-01-29T22:49:30Z","pushed_at":"2016-01-31T20:48:41Z","git_url":"git://github.com/seanjohnson08/ember.js.git","ssh_url":"git@github.com:seanjohnson08/ember.js.git","clone_url":"https://github.com/seanjohnson08/ember.js.git","svn_url":"https://github.com/seanjohnson08/ember.js","homepage":"http://www.emberjs.com","size":31169,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"emberjs:master","ref":"master","sha":"b63d5a50c61f6bb69716e27893ed7220f66a56b3","user":{"login":"emberjs","id":1253363,"avatar_url":"https://avatars.githubusercontent.com/u/1253363?v=3","gravatar_id":"","url":"https://api.github.com/users/emberjs","html_url":"https://github.com/emberjs","followers_url":"https://api.github.com/users/emberjs/followers","following_url":"https://api.github.com/users/emberjs/following{/other_user}","gists_url":"https://api.github.com/users/emberjs/gists{/gist_id}","starred_url":"https://api.github.com/users/emberjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emberjs/subscriptions","organizations_url":"https://api.github.com/users/emberjs/orgs","repos_url":"https://api.github.com/users/emberjs/repos","events_url":"https://api.github.com/users/emberjs/events{/privacy}","received_events_url":"https://api.github.com/users/emberjs/received_events","type":"Organization","site_admin":false},"repo":{"id":1801829,"name":"ember.js","full_name":"emberjs/ember.js","owner":{"login":"emberjs","id":1253363,"avatar_url":"https://avatars.githubusercontent.com/u/1253363?v=3","gravatar_id":"","url":"https://api.github.com/users/emberjs","html_url":"https://github.com/emberjs","followers_url":"https://api.github.com/users/emberjs/followers","following_url":"https://api.github.com/users/emberjs/following{/other_user}","gists_url":"https://api.github.com/users/emberjs/gists{/gist_id}","starred_url":"https://api.github.com/users/emberjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emberjs/subscriptions","organizations_url":"https://api.github.com/users/emberjs/orgs","repos_url":"https://api.github.com/users/emberjs/repos","events_url":"https://api.github.com/users/emberjs/events{/privacy}","received_events_url":"https://api.github.com/users/emberjs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/emberjs/ember.js","description":"Ember.js - A JavaScript framework for creating ambitious web applications","fork":false,"url":"https://api.github.com/repos/emberjs/ember.js","forks_url":"https://api.github.com/repos/emberjs/ember.js/forks","keys_url":"https://api.github.com/repos/emberjs/ember.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/emberjs/ember.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/emberjs/ember.js/teams","hooks_url":"https://api.github.com/repos/emberjs/ember.js/hooks","issue_events_url":"https://api.github.com/repos/emberjs/ember.js/issues/events{/number}","events_url":"https://api.github.com/repos/emberjs/ember.js/events","assignees_url":"https://api.github.com/repos/emberjs/ember.js/assignees{/user}","branches_url":"https://api.github.com/repos/emberjs/ember.js/branches{/branch}","tags_url":"https://api.github.com/repos/emberjs/ember.js/tags","blobs_url":"https://api.github.com/repos/emberjs/ember.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/emberjs/ember.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/emberjs/ember.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/emberjs/ember.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/emberjs/ember.js/statuses/{sha}","languages_url":"https://api.github.com/repos/emberjs/ember.js/languages","stargazers_url":"https://api.github.com/repos/emberjs/ember.js/stargazers","contributors_url":"https://api.github.com/repos/emberjs/ember.js/contributors","subscribers_url":"https://api.github.com/repos/emberjs/ember.js/subscribers","subscription_url":"https://api.github.com/repos/emberjs/ember.js/subscription","commits_url":"https://api.github.com/repos/emberjs/ember.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/emberjs/ember.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/emberjs/ember.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/emberjs/ember.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/emberjs/ember.js/contents/{+path}","compare_url":"https://api.github.com/repos/emberjs/ember.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/emberjs/ember.js/merges","archive_url":"https://api.github.com/repos/emberjs/ember.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/emberjs/ember.js/downloads","issues_url":"https://api.github.com/repos/emberjs/ember.js/issues{/number}","pulls_url":"https://api.github.com/repos/emberjs/ember.js/pulls{/number}","milestones_url":"https://api.github.com/repos/emberjs/ember.js/milestones{/number}","notifications_url":"https://api.github.com/repos/emberjs/ember.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/emberjs/ember.js/labels{/name}","releases_url":"https://api.github.com/repos/emberjs/ember.js/releases{/id}","deployments_url":"https://api.github.com/repos/emberjs/ember.js/deployments","created_at":"2011-05-25T23:39:40Z","updated_at":"2016-01-31T17:52:44Z","pushed_at":"2016-01-31T20:48:42Z","git_url":"git://github.com/emberjs/ember.js.git","ssh_url":"git@github.com:emberjs/ember.js.git","clone_url":"https://github.com/emberjs/ember.js.git","svn_url":"https://github.com/emberjs/ember.js","homepage":"http://www.emberjs.com","size":66245,"stargazers_count":15606,"watchers_count":15606,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3365,"mirror_url":null,"open_issues_count":403,"forks":3365,"open_issues":403,"watchers":15606,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/emberjs/ember.js/pulls/12875"},"html":{"href":"https://github.com/emberjs/ember.js/pull/12875"},"issue":{"href":"https://api.github.com/repos/emberjs/ember.js/issues/12875"},"comments":{"href":"https://api.github.com/repos/emberjs/ember.js/issues/12875/comments"},"review_comments":{"href":"https://api.github.com/repos/emberjs/ember.js/pulls/12875/comments"},"review_comment":{"href":"https://api.github.com/repos/emberjs/ember.js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/emberjs/ember.js/pulls/12875/commits"},"statuses":{"href":"https://api.github.com/repos/emberjs/ember.js/statuses/3dfb8e6824040c8417210515cb364aef700ee53d"}}}}