{"action":"created","comment":{"url":"https://api.github.com/repos/lencioni/consolidated-events/pulls/comments/122237084","pull_request_review_id":44336516,"id":122237084,"diff_hunk":"@@ -12,16 +12,3 @@ export function addEventListener(target, eventName, listener, options) {\n   const normalizedEventOptions = normalizeEventOptions(options);\n   return target[EVENT_HANDLERS_KEY].add(eventName, listener, normalizedEventOptions);\n }\n-\n-export function removeEventListener(eventHandle) {","path":"src/index.js","position":5,"original_position":5,"commit_id":"b25458db6b5dcf01e189eabf20dd86b089c8f50a","original_commit_id":"b25458db6b5dcf01e189eabf20dd86b089c8f50a","user":{"login":"lencioni","id":195534,"avatar_url":"https://avatars0.githubusercontent.com/u/195534?v=3","gravatar_id":"","url":"https://api.github.com/users/lencioni","html_url":"https://github.com/lencioni","followers_url":"https://api.github.com/users/lencioni/followers","following_url":"https://api.github.com/users/lencioni/following{/other_user}","gists_url":"https://api.github.com/users/lencioni/gists{/gist_id}","starred_url":"https://api.github.com/users/lencioni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lencioni/subscriptions","organizations_url":"https://api.github.com/users/lencioni/orgs","repos_url":"https://api.github.com/users/lencioni/repos","events_url":"https://api.github.com/users/lencioni/events{/privacy}","received_events_url":"https://api.github.com/users/lencioni/received_events","type":"User","site_admin":false},"body":"@ljharb oh, you're just no fun!","created_at":"2017-06-15T15:41:30Z","updated_at":"2017-06-15T15:41:31Z","html_url":"https://github.com/lencioni/consolidated-events/pull/4#discussion_r122237084","pull_request_url":"https://api.github.com/repos/lencioni/consolidated-events/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/lencioni/consolidated-events/pulls/comments/122237084"},"html":{"href":"https://github.com/lencioni/consolidated-events/pull/4#discussion_r122237084"},"pull_request":{"href":"https://api.github.com/repos/lencioni/consolidated-events/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/lencioni/consolidated-events/pulls/4","id":125719607,"html_url":"https://github.com/lencioni/consolidated-events/pull/4","diff_url":"https://github.com/lencioni/consolidated-events/pull/4.diff","patch_url":"https://github.com/lencioni/consolidated-events/pull/4.patch","issue_url":"https://api.github.com/repos/lencioni/consolidated-events/issues/4","number":4,"state":"open","locked":false,"title":"Return unsubscribe function from addEventListener","user":{"login":"lencioni","id":195534,"avatar_url":"https://avatars0.githubusercontent.com/u/195534?v=3","gravatar_id":"","url":"https://api.github.com/users/lencioni","html_url":"https://github.com/lencioni","followers_url":"https://api.github.com/users/lencioni/followers","following_url":"https://api.github.com/users/lencioni/following{/other_user}","gists_url":"https://api.github.com/users/lencioni/gists{/gist_id}","starred_url":"https://api.github.com/users/lencioni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lencioni/subscriptions","organizations_url":"https://api.github.com/users/lencioni/orgs","repos_url":"https://api.github.com/users/lencioni/repos","events_url":"https://api.github.com/users/lencioni/events{/privacy}","received_events_url":"https://api.github.com/users/lencioni/received_events","type":"User","site_admin":false},"body":"Instead of returning a handle, which you need to pass to\r\n`removeEventListener`, I think it might be nicer to return a function\r\nthat you can simply call.\r\n\r\nSo instead of this:\r\n\r\n```js\r\nimport { addEventListener, removeEventListener } from 'consolidated-events';\r\n\r\nconst handle = addEventListener(...);\r\n...\r\nremoveEventListener(handle);\r\n```\r\n\r\nThe API would be this:\r\n\r\n```js\r\nimport { addEventListener } from 'consolidated-events';\r\n\r\nconst unsubscribe = addEventListener(...);\r\n...\r\nunsubscribe();\r\n```\r\n\r\nThis is a breaking change.\r\n\r\nCloses #3 \r\n\r\ncc @trotzig @jmeas @ljharb ","created_at":"2017-06-15T00:25:52Z","updated_at":"2017-06-15T15:41:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d3e9929a560ccb5304491cdcd518fe2a22b5be29","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/lencioni/consolidated-events/pulls/4/commits","review_comments_url":"https://api.github.com/repos/lencioni/consolidated-events/pulls/4/comments","review_comment_url":"https://api.github.com/repos/lencioni/consolidated-events/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lencioni/consolidated-events/issues/4/comments","statuses_url":"https://api.github.com/repos/lencioni/consolidated-events/statuses/b25458db6b5dcf01e189eabf20dd86b089c8f50a","head":{"label":"lencioni:unsubscribe","ref":"unsubscribe","sha":"b25458db6b5dcf01e189eabf20dd86b089c8f50a","user":{"login":"lencioni","id":195534,"avatar_url":"https://avatars0.githubusercontent.com/u/195534?v=3","gravatar_id":"","url":"https://api.github.com/users/lencioni","html_url":"https://github.com/lencioni","followers_url":"https://api.github.com/users/lencioni/followers","following_url":"https://api.github.com/users/lencioni/following{/other_user}","gists_url":"https://api.github.com/users/lencioni/gists{/gist_id}","starred_url":"https://api.github.com/users/lencioni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lencioni/subscriptions","organizations_url":"https://api.github.com/users/lencioni/orgs","repos_url":"https://api.github.com/users/lencioni/repos","events_url":"https://api.github.com/users/lencioni/events{/privacy}","received_events_url":"https://api.github.com/users/lencioni/received_events","type":"User","site_admin":false},"repo":{"id":72685710,"name":"consolidated-events","full_name":"lencioni/consolidated-events","owner":{"login":"lencioni","id":195534,"avatar_url":"https://avatars0.githubusercontent.com/u/195534?v=3","gravatar_id":"","url":"https://api.github.com/users/lencioni","html_url":"https://github.com/lencioni","followers_url":"https://api.github.com/users/lencioni/followers","following_url":"https://api.github.com/users/lencioni/following{/other_user}","gists_url":"https://api.github.com/users/lencioni/gists{/gist_id}","starred_url":"https://api.github.com/users/lencioni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lencioni/subscriptions","organizations_url":"https://api.github.com/users/lencioni/orgs","repos_url":"https://api.github.com/users/lencioni/repos","events_url":"https://api.github.com/users/lencioni/events{/privacy}","received_events_url":"https://api.github.com/users/lencioni/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lencioni/consolidated-events","description":"Manage multiple event handlers using few event listeners","fork":false,"url":"https://api.github.com/repos/lencioni/consolidated-events","forks_url":"https://api.github.com/repos/lencioni/consolidated-events/forks","keys_url":"https://api.github.com/repos/lencioni/consolidated-events/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lencioni/consolidated-events/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lencioni/consolidated-events/teams","hooks_url":"https://api.github.com/repos/lencioni/consolidated-events/hooks","issue_events_url":"https://api.github.com/repos/lencioni/consolidated-events/issues/events{/number}","events_url":"https://api.github.com/repos/lencioni/consolidated-events/events","assignees_url":"https://api.github.com/repos/lencioni/consolidated-events/assignees{/user}","branches_url":"https://api.github.com/repos/lencioni/consolidated-events/branches{/branch}","tags_url":"https://api.github.com/repos/lencioni/consolidated-events/tags","blobs_url":"https://api.github.com/repos/lencioni/consolidated-events/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lencioni/consolidated-events/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lencioni/consolidated-events/git/refs{/sha}","trees_url":"https://api.github.com/repos/lencioni/consolidated-events/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lencioni/consolidated-events/statuses/{sha}","languages_url":"https://api.github.com/repos/lencioni/consolidated-events/languages","stargazers_url":"https://api.github.com/repos/lencioni/consolidated-events/stargazers","contributors_url":"https://api.github.com/repos/lencioni/consolidated-events/contributors","subscribers_url":"https://api.github.com/repos/lencioni/consolidated-events/subscribers","subscription_url":"https://api.github.com/repos/lencioni/consolidated-events/subscription","commits_url":"https://api.github.com/repos/lencioni/consolidated-events/commits{/sha}","git_commits_url":"https://api.github.com/repos/lencioni/consolidated-events/git/commits{/sha}","comments_url":"https://api.github.com/repos/lencioni/consolidated-events/comments{/number}","issue_comment_url":"https://api.github.com/repos/lencioni/consolidated-events/issues/comments{/number}","contents_url":"https://api.github.com/repos/lencioni/consolidated-events/contents/{+path}","compare_url":"https://api.github.com/repos/lencioni/consolidated-events/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lencioni/consolidated-events/merges","archive_url":"https://api.github.com/repos/lencioni/consolidated-events/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lencioni/consolidated-events/downloads","issues_url":"https://api.github.com/repos/lencioni/consolidated-events/issues{/number}","pulls_url":"https://api.github.com/repos/lencioni/consolidated-events/pulls{/number}","milestones_url":"https://api.github.com/repos/lencioni/consolidated-events/milestones{/number}","notifications_url":"https://api.github.com/repos/lencioni/consolidated-events/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lencioni/consolidated-events/labels{/name}","releases_url":"https://api.github.com/repos/lencioni/consolidated-events/releases{/id}","deployments_url":"https://api.github.com/repos/lencioni/consolidated-events/deployments","created_at":"2016-11-02T22:10:39Z","updated_at":"2017-06-14T23:48:21Z","pushed_at":"2017-06-15T00:25:53Z","git_url":"git://github.com/lencioni/consolidated-events.git","ssh_url":"git@github.com:lencioni/consolidated-events.git","clone_url":"https://github.com/lencioni/consolidated-events.git","svn_url":"https://github.com/lencioni/consolidated-events","homepage":null,"size":30,"stargazers_count":15,"watchers_count":15,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":3,"forks":3,"open_issues":3,"watchers":15,"default_branch":"master"}},"base":{"label":"lencioni:master","ref":"master","sha":"f531ec0c1d55a472fb95b7d03a7b769d89ec2092","user":{"login":"lencioni","id":195534,"avatar_url":"https://avatars0.githubusercontent.com/u/195534?v=3","gravatar_id":"","url":"https://api.github.com/users/lencioni","html_url":"https://github.com/lencioni","followers_url":"https://api.github.com/users/lencioni/followers","following_url":"https://api.github.com/users/lencioni/following{/other_user}","gists_url":"https://api.github.com/users/lencioni/gists{/gist_id}","starred_url":"https://api.github.com/users/lencioni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lencioni/subscriptions","organizations_url":"https://api.github.com/users/lencioni/orgs","repos_url":"https://api.github.com/users/lencioni/repos","events_url":"https://api.github.com/users/lencioni/events{/privacy}","received_events_url":"https://api.github.com/users/lencioni/received_events","type":"User","site_admin":false},"repo":{"id":72685710,"name":"consolidated-events","full_name":"lencioni/consolidated-events","owner":{"login":"lencioni","id":195534,"avatar_url":"https://avatars0.githubusercontent.com/u/195534?v=3","gravatar_id":"","url":"https://api.github.com/users/lencioni","html_url":"https://github.com/lencioni","followers_url":"https://api.github.com/users/lencioni/followers","following_url":"https://api.github.com/users/lencioni/following{/other_user}","gists_url":"https://api.github.com/users/lencioni/gists{/gist_id}","starred_url":"https://api.github.com/users/lencioni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lencioni/subscriptions","organizations_url":"https://api.github.com/users/lencioni/orgs","repos_url":"https://api.github.com/users/lencioni/repos","events_url":"https://api.github.com/users/lencioni/events{/privacy}","received_events_url":"https://api.github.com/users/lencioni/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lencioni/consolidated-events","description":"Manage multiple event handlers using few event listeners","fork":false,"url":"https://api.github.com/repos/lencioni/consolidated-events","forks_url":"https://api.github.com/repos/lencioni/consolidated-events/forks","keys_url":"https://api.github.com/repos/lencioni/consolidated-events/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lencioni/consolidated-events/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lencioni/consolidated-events/teams","hooks_url":"https://api.github.com/repos/lencioni/consolidated-events/hooks","issue_events_url":"https://api.github.com/repos/lencioni/consolidated-events/issues/events{/number}","events_url":"https://api.github.com/repos/lencioni/consolidated-events/events","assignees_url":"https://api.github.com/repos/lencioni/consolidated-events/assignees{/user}","branches_url":"https://api.github.com/repos/lencioni/consolidated-events/branches{/branch}","tags_url":"https://api.github.com/repos/lencioni/consolidated-events/tags","blobs_url":"https://api.github.com/repos/lencioni/consolidated-events/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lencioni/consolidated-events/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lencioni/consolidated-events/git/refs{/sha}","trees_url":"https://api.github.com/repos/lencioni/consolidated-events/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lencioni/consolidated-events/statuses/{sha}","languages_url":"https://api.github.com/repos/lencioni/consolidated-events/languages","stargazers_url":"https://api.github.com/repos/lencioni/consolidated-events/stargazers","contributors_url":"https://api.github.com/repos/lencioni/consolidated-events/contributors","subscribers_url":"https://api.github.com/repos/lencioni/consolidated-events/subscribers","subscription_url":"https://api.github.com/repos/lencioni/consolidated-events/subscription","commits_url":"https://api.github.com/repos/lencioni/consolidated-events/commits{/sha}","git_commits_url":"https://api.github.com/repos/lencioni/consolidated-events/git/commits{/sha}","comments_url":"https://api.github.com/repos/lencioni/consolidated-events/comments{/number}","issue_comment_url":"https://api.github.com/repos/lencioni/consolidated-events/issues/comments{/number}","contents_url":"https://api.github.com/repos/lencioni/consolidated-events/contents/{+path}","compare_url":"https://api.github.com/repos/lencioni/consolidated-events/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lencioni/consolidated-events/merges","archive_url":"https://api.github.com/repos/lencioni/consolidated-events/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lencioni/consolidated-events/downloads","issues_url":"https://api.github.com/repos/lencioni/consolidated-events/issues{/number}","pulls_url":"https://api.github.com/repos/lencioni/consolidated-events/pulls{/number}","milestones_url":"https://api.github.com/repos/lencioni/consolidated-events/milestones{/number}","notifications_url":"https://api.github.com/repos/lencioni/consolidated-events/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lencioni/consolidated-events/labels{/name}","releases_url":"https://api.github.com/repos/lencioni/consolidated-events/releases{/id}","deployments_url":"https://api.github.com/repos/lencioni/consolidated-events/deployments","created_at":"2016-11-02T22:10:39Z","updated_at":"2017-06-14T23:48:21Z","pushed_at":"2017-06-15T00:25:53Z","git_url":"git://github.com/lencioni/consolidated-events.git","ssh_url":"git@github.com:lencioni/consolidated-events.git","clone_url":"https://github.com/lencioni/consolidated-events.git","svn_url":"https://github.com/lencioni/consolidated-events","homepage":null,"size":30,"stargazers_count":15,"watchers_count":15,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":3,"forks":3,"open_issues":3,"watchers":15,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lencioni/consolidated-events/pulls/4"},"html":{"href":"https://github.com/lencioni/consolidated-events/pull/4"},"issue":{"href":"https://api.github.com/repos/lencioni/consolidated-events/issues/4"},"comments":{"href":"https://api.github.com/repos/lencioni/consolidated-events/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/lencioni/consolidated-events/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/lencioni/consolidated-events/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lencioni/consolidated-events/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/lencioni/consolidated-events/statuses/b25458db6b5dcf01e189eabf20dd86b089c8f50a"}}}}
{"actor":{"display_login":"lencioni"}}