{"action":"created","comment":{"url":"https://api.github.com/repos/nodejs/node/pulls/comments/46729859","id":46729859,"diff_hunk":"@@ -10,7 +10,8 @@ is opened. All objects which emit events are instances of `events.EventEmitter`.\n You can access this module by doing: `require(\"events\");`\n \n Typically, event names are represented by a camel-cased string, however,\n-there aren't any strict restrictions on that, as any string will be accepted.\n+there aren't any strict restrictions on that, as any string or symbol will be\n+accepted.","path":"doc/api/events.markdown","position":6,"original_position":6,"commit_id":"f0f048406f6792c0242a2dbfcedf68d0667808c5","original_commit_id":"f0f048406f6792c0242a2dbfcedf68d0667808c5","user":{"login":"trevnorris","id":289174,"avatar_url":"https://avatars.githubusercontent.com/u/289174?v=3","gravatar_id":"","url":"https://api.github.com/users/trevnorris","html_url":"https://github.com/trevnorris","followers_url":"https://api.github.com/users/trevnorris/followers","following_url":"https://api.github.com/users/trevnorris/following{/other_user}","gists_url":"https://api.github.com/users/trevnorris/gists{/gist_id}","starred_url":"https://api.github.com/users/trevnorris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trevnorris/subscriptions","organizations_url":"https://api.github.com/users/trevnorris/orgs","repos_url":"https://api.github.com/users/trevnorris/repos","events_url":"https://api.github.com/users/trevnorris/events{/privacy}","received_events_url":"https://api.github.com/users/trevnorris/received_events","type":"User","site_admin":false},"body":"It's not documented, but you can emit on objects as well.\r\n```js\r\nconst EE = require('events');\r\nconst e = new EE();\r\nconst b = { foo: 42 };\r\ne.on(b, function() { console.log('hi'); });\r\ne.emit(b);\r\n```","created_at":"2015-12-04T20:42:15Z","updated_at":"2015-12-04T20:42:15Z","html_url":"https://github.com/nodejs/node/pull/4151#discussion_r46729859","pull_request_url":"https://api.github.com/repos/nodejs/node/pulls/4151","_links":{"self":{"href":"https://api.github.com/repos/nodejs/node/pulls/comments/46729859"},"html":{"href":"https://github.com/nodejs/node/pull/4151#discussion_r46729859"},"pull_request":{"href":"https://api.github.com/repos/nodejs/node/pulls/4151"}}},"pull_request":{"url":"https://api.github.com/repos/nodejs/node/pulls/4151","id":52640518,"html_url":"https://github.com/nodejs/node/pull/4151","diff_url":"https://github.com/nodejs/node/pull/4151.diff","patch_url":"https://github.com/nodejs/node/pull/4151.patch","issue_url":"https://api.github.com/repos/nodejs/node/issues/4151","number":4151,"state":"open","locked":false,"title":"doc, test: Symbols as event names","user":{"login":"bengl","id":110455,"avatar_url":"https://avatars.githubusercontent.com/u/110455?v=3","gravatar_id":"","url":"https://api.github.com/users/bengl","html_url":"https://github.com/bengl","followers_url":"https://api.github.com/users/bengl/followers","following_url":"https://api.github.com/users/bengl/following{/other_user}","gists_url":"https://api.github.com/users/bengl/gists{/gist_id}","starred_url":"https://api.github.com/users/bengl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bengl/subscriptions","organizations_url":"https://api.github.com/users/bengl/orgs","repos_url":"https://api.github.com/users/bengl/repos","events_url":"https://api.github.com/users/bengl/events{/privacy}","received_events_url":"https://api.github.com/users/bengl/received_events","type":"User","site_admin":false},"body":"As a result of the new support for Symbols in V8, along with the implementation of EventEmitter in Node, it turns out that Symbols are usable as event names. This adds the possibility of Symbol event names to the docs, and adds an EventEmitter test specific to Symbols so as to ensure that this doesn't break due to any potential future alternative implementations.","created_at":"2015-12-04T08:10:57Z","updated_at":"2015-12-04T20:42:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9f59caa62c9ab4d7903338e1f6ebc3eb4ad3728f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/nodejs/node/pulls/4151/commits","review_comments_url":"https://api.github.com/repos/nodejs/node/pulls/4151/comments","review_comment_url":"https://api.github.com/repos/nodejs/node/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nodejs/node/issues/4151/comments","statuses_url":"https://api.github.com/repos/nodejs/node/statuses/f0f048406f6792c0242a2dbfcedf68d0667808c5","head":{"label":"bengl:symbolevents","ref":"symbolevents","sha":"f0f048406f6792c0242a2dbfcedf68d0667808c5","user":{"login":"bengl","id":110455,"avatar_url":"https://avatars.githubusercontent.com/u/110455?v=3","gravatar_id":"","url":"https://api.github.com/users/bengl","html_url":"https://github.com/bengl","followers_url":"https://api.github.com/users/bengl/followers","following_url":"https://api.github.com/users/bengl/following{/other_user}","gists_url":"https://api.github.com/users/bengl/gists{/gist_id}","starred_url":"https://api.github.com/users/bengl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bengl/subscriptions","organizations_url":"https://api.github.com/users/bengl/orgs","repos_url":"https://api.github.com/users/bengl/repos","events_url":"https://api.github.com/users/bengl/events{/privacy}","received_events_url":"https://api.github.com/users/bengl/received_events","type":"User","site_admin":false},"repo":{"id":45964268,"name":"node","full_name":"bengl/node","owner":{"login":"bengl","id":110455,"avatar_url":"https://avatars.githubusercontent.com/u/110455?v=3","gravatar_id":"","url":"https://api.github.com/users/bengl","html_url":"https://github.com/bengl","followers_url":"https://api.github.com/users/bengl/followers","following_url":"https://api.github.com/users/bengl/following{/other_user}","gists_url":"https://api.github.com/users/bengl/gists{/gist_id}","starred_url":"https://api.github.com/users/bengl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bengl/subscriptions","organizations_url":"https://api.github.com/users/bengl/orgs","repos_url":"https://api.github.com/users/bengl/repos","events_url":"https://api.github.com/users/bengl/events{/privacy}","received_events_url":"https://api.github.com/users/bengl/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bengl/node","description":"Node.js JavaScript runtime :sparkles::turtle::rocket::sparkles:","fork":true,"url":"https://api.github.com/repos/bengl/node","forks_url":"https://api.github.com/repos/bengl/node/forks","keys_url":"https://api.github.com/repos/bengl/node/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bengl/node/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bengl/node/teams","hooks_url":"https://api.github.com/repos/bengl/node/hooks","issue_events_url":"https://api.github.com/repos/bengl/node/issues/events{/number}","events_url":"https://api.github.com/repos/bengl/node/events","assignees_url":"https://api.github.com/repos/bengl/node/assignees{/user}","branches_url":"https://api.github.com/repos/bengl/node/branches{/branch}","tags_url":"https://api.github.com/repos/bengl/node/tags","blobs_url":"https://api.github.com/repos/bengl/node/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bengl/node/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bengl/node/git/refs{/sha}","trees_url":"https://api.github.com/repos/bengl/node/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bengl/node/statuses/{sha}","languages_url":"https://api.github.com/repos/bengl/node/languages","stargazers_url":"https://api.github.com/repos/bengl/node/stargazers","contributors_url":"https://api.github.com/repos/bengl/node/contributors","subscribers_url":"https://api.github.com/repos/bengl/node/subscribers","subscription_url":"https://api.github.com/repos/bengl/node/subscription","commits_url":"https://api.github.com/repos/bengl/node/commits{/sha}","git_commits_url":"https://api.github.com/repos/bengl/node/git/commits{/sha}","comments_url":"https://api.github.com/repos/bengl/node/comments{/number}","issue_comment_url":"https://api.github.com/repos/bengl/node/issues/comments{/number}","contents_url":"https://api.github.com/repos/bengl/node/contents/{+path}","compare_url":"https://api.github.com/repos/bengl/node/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bengl/node/merges","archive_url":"https://api.github.com/repos/bengl/node/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bengl/node/downloads","issues_url":"https://api.github.com/repos/bengl/node/issues{/number}","pulls_url":"https://api.github.com/repos/bengl/node/pulls{/number}","milestones_url":"https://api.github.com/repos/bengl/node/milestones{/number}","notifications_url":"https://api.github.com/repos/bengl/node/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bengl/node/labels{/name}","releases_url":"https://api.github.com/repos/bengl/node/releases{/id}","created_at":"2015-11-11T06:37:09Z","updated_at":"2015-11-11T06:37:30Z","pushed_at":"2015-12-04T17:16:31Z","git_url":"git://github.com/bengl/node.git","ssh_url":"git@github.com:bengl/node.git","clone_url":"https://github.com/bengl/node.git","svn_url":"https://github.com/bengl/node","homepage":"https://nodejs.org","size":161155,"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":"nodejs:master","ref":"master","sha":"1e324d883ea5f067999e02ea7fc2054e88974da6","user":{"login":"nodejs","id":9950313,"avatar_url":"https://avatars.githubusercontent.com/u/9950313?v=3","gravatar_id":"","url":"https://api.github.com/users/nodejs","html_url":"https://github.com/nodejs","followers_url":"https://api.github.com/users/nodejs/followers","following_url":"https://api.github.com/users/nodejs/following{/other_user}","gists_url":"https://api.github.com/users/nodejs/gists{/gist_id}","starred_url":"https://api.github.com/users/nodejs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nodejs/subscriptions","organizations_url":"https://api.github.com/users/nodejs/orgs","repos_url":"https://api.github.com/users/nodejs/repos","events_url":"https://api.github.com/users/nodejs/events{/privacy}","received_events_url":"https://api.github.com/users/nodejs/received_events","type":"Organization","site_admin":false},"repo":{"id":27193779,"name":"node","full_name":"nodejs/node","owner":{"login":"nodejs","id":9950313,"avatar_url":"https://avatars.githubusercontent.com/u/9950313?v=3","gravatar_id":"","url":"https://api.github.com/users/nodejs","html_url":"https://github.com/nodejs","followers_url":"https://api.github.com/users/nodejs/followers","following_url":"https://api.github.com/users/nodejs/following{/other_user}","gists_url":"https://api.github.com/users/nodejs/gists{/gist_id}","starred_url":"https://api.github.com/users/nodejs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nodejs/subscriptions","organizations_url":"https://api.github.com/users/nodejs/orgs","repos_url":"https://api.github.com/users/nodejs/repos","events_url":"https://api.github.com/users/nodejs/events{/privacy}","received_events_url":"https://api.github.com/users/nodejs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nodejs/node","description":"Node.js JavaScript runtime :sparkles::turtle::rocket::sparkles:","fork":false,"url":"https://api.github.com/repos/nodejs/node","forks_url":"https://api.github.com/repos/nodejs/node/forks","keys_url":"https://api.github.com/repos/nodejs/node/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nodejs/node/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nodejs/node/teams","hooks_url":"https://api.github.com/repos/nodejs/node/hooks","issue_events_url":"https://api.github.com/repos/nodejs/node/issues/events{/number}","events_url":"https://api.github.com/repos/nodejs/node/events","assignees_url":"https://api.github.com/repos/nodejs/node/assignees{/user}","branches_url":"https://api.github.com/repos/nodejs/node/branches{/branch}","tags_url":"https://api.github.com/repos/nodejs/node/tags","blobs_url":"https://api.github.com/repos/nodejs/node/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nodejs/node/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nodejs/node/git/refs{/sha}","trees_url":"https://api.github.com/repos/nodejs/node/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nodejs/node/statuses/{sha}","languages_url":"https://api.github.com/repos/nodejs/node/languages","stargazers_url":"https://api.github.com/repos/nodejs/node/stargazers","contributors_url":"https://api.github.com/repos/nodejs/node/contributors","subscribers_url":"https://api.github.com/repos/nodejs/node/subscribers","subscription_url":"https://api.github.com/repos/nodejs/node/subscription","commits_url":"https://api.github.com/repos/nodejs/node/commits{/sha}","git_commits_url":"https://api.github.com/repos/nodejs/node/git/commits{/sha}","comments_url":"https://api.github.com/repos/nodejs/node/comments{/number}","issue_comment_url":"https://api.github.com/repos/nodejs/node/issues/comments{/number}","contents_url":"https://api.github.com/repos/nodejs/node/contents/{+path}","compare_url":"https://api.github.com/repos/nodejs/node/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nodejs/node/merges","archive_url":"https://api.github.com/repos/nodejs/node/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nodejs/node/downloads","issues_url":"https://api.github.com/repos/nodejs/node/issues{/number}","pulls_url":"https://api.github.com/repos/nodejs/node/pulls{/number}","milestones_url":"https://api.github.com/repos/nodejs/node/milestones{/number}","notifications_url":"https://api.github.com/repos/nodejs/node/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nodejs/node/labels{/name}","releases_url":"https://api.github.com/repos/nodejs/node/releases{/id}","created_at":"2014-11-26T19:57:11Z","updated_at":"2015-12-04T19:57:33Z","pushed_at":"2015-12-04T18:26:55Z","git_url":"git://github.com/nodejs/node.git","ssh_url":"git@github.com:nodejs/node.git","clone_url":"https://github.com/nodejs/node.git","svn_url":"https://github.com/nodejs/node","homepage":"https://nodejs.org","size":175311,"stargazers_count":17919,"watchers_count":17919,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1944,"mirror_url":null,"open_issues_count":607,"forks":1944,"open_issues":607,"watchers":17919,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nodejs/node/pulls/4151"},"html":{"href":"https://github.com/nodejs/node/pull/4151"},"issue":{"href":"https://api.github.com/repos/nodejs/node/issues/4151"},"comments":{"href":"https://api.github.com/repos/nodejs/node/issues/4151/comments"},"review_comments":{"href":"https://api.github.com/repos/nodejs/node/pulls/4151/comments"},"review_comment":{"href":"https://api.github.com/repos/nodejs/node/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nodejs/node/pulls/4151/commits"},"statuses":{"href":"https://api.github.com/repos/nodejs/node/statuses/f0f048406f6792c0242a2dbfcedf68d0667808c5"}}}}