{"action":"created","comment":{"url":"https://api.github.com/repos/urfu-2015/javascript-tasks-5/pulls/comments/44109698","id":44109698,"diff_hunk":"@@ -21,3 +51,23 @@ module.exports = function () {\n         }\n     };\n };\n+\n+function findStudent(array, element, field) {\n+    var value = null;\n+    array.forEach(function (item, i) {\n+        if (item[field] === element) {\n+            value = i;\n+        }\n+    });\n+    return value;\n+}\n+\n+function findEventName(array, eventName, field) {\n+    var value = [];\n+    array.forEach(function (item, i) {\n+        if (item[field].lastIndexOf(eventName, 0) > -1) {\n+            value.push(i);\n+        }\n+    });\n+    return value.reverse();","path":"emitter.js","position":71,"original_position":71,"commit_id":"e7f69bd5cd0a79530164af63442137ff2ef5134b","original_commit_id":"e7f69bd5cd0a79530164af63442137ff2ef5134b","user":{"login":"dzlk","id":894822,"avatar_url":"https://avatars.githubusercontent.com/u/894822?v=3","gravatar_id":"","url":"https://api.github.com/users/dzlk","html_url":"https://github.com/dzlk","followers_url":"https://api.github.com/users/dzlk/followers","following_url":"https://api.github.com/users/dzlk/following{/other_user}","gists_url":"https://api.github.com/users/dzlk/gists{/gist_id}","starred_url":"https://api.github.com/users/dzlk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dzlk/subscriptions","organizations_url":"https://api.github.com/users/dzlk/orgs","repos_url":"https://api.github.com/users/dzlk/repos","events_url":"https://api.github.com/users/dzlk/events{/privacy}","received_events_url":"https://api.github.com/users/dzlk/received_events","type":"User","site_admin":false},"body":"юзай unshift вместо push и не надо будет реверсить, кстати зачем реверсишь?","created_at":"2015-11-06T07:08:24Z","updated_at":"2015-11-06T07:08:24Z","html_url":"https://github.com/urfu-2015/javascript-tasks-5/pull/24#discussion_r44109698","pull_request_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-5/pulls/24","_links":{"self":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-5/pulls/comments/44109698"},"html":{"href":"https://github.com/urfu-2015/javascript-tasks-5/pull/24#discussion_r44109698"},"pull_request":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-5/pulls/24"}}},"pull_request":{"url":"https://api.github.com/repos/urfu-2015/javascript-tasks-5/pulls/24","id":49416475,"html_url":"https://github.com/urfu-2015/javascript-tasks-5/pull/24","diff_url":"https://github.com/urfu-2015/javascript-tasks-5/pull/24.diff","patch_url":"https://github.com/urfu-2015/javascript-tasks-5/pull/24.patch","issue_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-5/issues/24","number":24,"state":"open","locked":false,"title":"Сухачев Илья","user":{"login":"lifeandfree","id":7126669,"avatar_url":"https://avatars.githubusercontent.com/u/7126669?v=3","gravatar_id":"","url":"https://api.github.com/users/lifeandfree","html_url":"https://github.com/lifeandfree","followers_url":"https://api.github.com/users/lifeandfree/followers","following_url":"https://api.github.com/users/lifeandfree/following{/other_user}","gists_url":"https://api.github.com/users/lifeandfree/gists{/gist_id}","starred_url":"https://api.github.com/users/lifeandfree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lifeandfree/subscriptions","organizations_url":"https://api.github.com/users/lifeandfree/orgs","repos_url":"https://api.github.com/users/lifeandfree/repos","events_url":"https://api.github.com/users/lifeandfree/events{/privacy}","received_events_url":"https://api.github.com/users/lifeandfree/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-11-02T10:39:09Z","updated_at":"2015-11-06T07:08:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2ded1007fb59a377a44df51adfd7b5dedf4185f6","assignee":{"login":"dzlk","id":894822,"avatar_url":"https://avatars.githubusercontent.com/u/894822?v=3","gravatar_id":"","url":"https://api.github.com/users/dzlk","html_url":"https://github.com/dzlk","followers_url":"https://api.github.com/users/dzlk/followers","following_url":"https://api.github.com/users/dzlk/following{/other_user}","gists_url":"https://api.github.com/users/dzlk/gists{/gist_id}","starred_url":"https://api.github.com/users/dzlk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dzlk/subscriptions","organizations_url":"https://api.github.com/users/dzlk/orgs","repos_url":"https://api.github.com/users/dzlk/repos","events_url":"https://api.github.com/users/dzlk/events{/privacy}","received_events_url":"https://api.github.com/users/dzlk/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-5/pulls/24/commits","review_comments_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-5/pulls/24/comments","review_comment_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-5/pulls/comments{/number}","comments_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-5/issues/24/comments","statuses_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-5/statuses/e7f69bd5cd0a79530164af63442137ff2ef5134b","head":{"label":"lifeandfree:master","ref":"master","sha":"e7f69bd5cd0a79530164af63442137ff2ef5134b","user":{"login":"lifeandfree","id":7126669,"avatar_url":"https://avatars.githubusercontent.com/u/7126669?v=3","gravatar_id":"","url":"https://api.github.com/users/lifeandfree","html_url":"https://github.com/lifeandfree","followers_url":"https://api.github.com/users/lifeandfree/followers","following_url":"https://api.github.com/users/lifeandfree/following{/other_user}","gists_url":"https://api.github.com/users/lifeandfree/gists{/gist_id}","starred_url":"https://api.github.com/users/lifeandfree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lifeandfree/subscriptions","organizations_url":"https://api.github.com/users/lifeandfree/orgs","repos_url":"https://api.github.com/users/lifeandfree/repos","events_url":"https://api.github.com/users/lifeandfree/events{/privacy}","received_events_url":"https://api.github.com/users/lifeandfree/received_events","type":"User","site_admin":false},"repo":{"id":45106905,"name":"javascript-tasks-5","full_name":"lifeandfree/javascript-tasks-5","owner":{"login":"lifeandfree","id":7126669,"avatar_url":"https://avatars.githubusercontent.com/u/7126669?v=3","gravatar_id":"","url":"https://api.github.com/users/lifeandfree","html_url":"https://github.com/lifeandfree","followers_url":"https://api.github.com/users/lifeandfree/followers","following_url":"https://api.github.com/users/lifeandfree/following{/other_user}","gists_url":"https://api.github.com/users/lifeandfree/gists{/gist_id}","starred_url":"https://api.github.com/users/lifeandfree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lifeandfree/subscriptions","organizations_url":"https://api.github.com/users/lifeandfree/orgs","repos_url":"https://api.github.com/users/lifeandfree/repos","events_url":"https://api.github.com/users/lifeandfree/events{/privacy}","received_events_url":"https://api.github.com/users/lifeandfree/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lifeandfree/javascript-tasks-5","description":"Задача к лекции «This / Bind / Call / Apply» – «Пора на лекцию»","fork":true,"url":"https://api.github.com/repos/lifeandfree/javascript-tasks-5","forks_url":"https://api.github.com/repos/lifeandfree/javascript-tasks-5/forks","keys_url":"https://api.github.com/repos/lifeandfree/javascript-tasks-5/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lifeandfree/javascript-tasks-5/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lifeandfree/javascript-tasks-5/teams","hooks_url":"https://api.github.com/repos/lifeandfree/javascript-tasks-5/hooks","issue_events_url":"https://api.github.com/repos/lifeandfree/javascript-tasks-5/issues/events{/number}","events_url":"https://api.github.com/repos/lifeandfree/javascript-tasks-5/events","assignees_url":"https://api.github.com/repos/lifeandfree/javascript-tasks-5/assignees{/user}","branches_url":"https://api.github.com/repos/lifeandfree/javascript-tasks-5/branches{/branch}","tags_url":"https://api.github.com/repos/lifeandfree/javascript-tasks-5/tags","blobs_url":"https://api.github.com/repos/lifeandfree/javascript-tasks-5/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lifeandfree/javascript-tasks-5/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lifeandfree/javascript-tasks-5/git/refs{/sha}","trees_url":"https://api.github.com/repos/lifeandfree/javascript-tasks-5/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lifeandfree/javascript-tasks-5/statuses/{sha}","languages_url":"https://api.github.com/repos/lifeandfree/javascript-tasks-5/languages","stargazers_url":"https://api.github.com/repos/lifeandfree/javascript-tasks-5/stargazers","contributors_url":"https://api.github.com/repos/lifeandfree/javascript-tasks-5/contributors","subscribers_url":"https://api.github.com/repos/lifeandfree/javascript-tasks-5/subscribers","subscription_url":"https://api.github.com/repos/lifeandfree/javascript-tasks-5/subscription","commits_url":"https://api.github.com/repos/lifeandfree/javascript-tasks-5/commits{/sha}","git_commits_url":"https://api.github.com/repos/lifeandfree/javascript-tasks-5/git/commits{/sha}","comments_url":"https://api.github.com/repos/lifeandfree/javascript-tasks-5/comments{/number}","issue_comment_url":"https://api.github.com/repos/lifeandfree/javascript-tasks-5/issues/comments{/number}","contents_url":"https://api.github.com/repos/lifeandfree/javascript-tasks-5/contents/{+path}","compare_url":"https://api.github.com/repos/lifeandfree/javascript-tasks-5/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lifeandfree/javascript-tasks-5/merges","archive_url":"https://api.github.com/repos/lifeandfree/javascript-tasks-5/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lifeandfree/javascript-tasks-5/downloads","issues_url":"https://api.github.com/repos/lifeandfree/javascript-tasks-5/issues{/number}","pulls_url":"https://api.github.com/repos/lifeandfree/javascript-tasks-5/pulls{/number}","milestones_url":"https://api.github.com/repos/lifeandfree/javascript-tasks-5/milestones{/number}","notifications_url":"https://api.github.com/repos/lifeandfree/javascript-tasks-5/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lifeandfree/javascript-tasks-5/labels{/name}","releases_url":"https://api.github.com/repos/lifeandfree/javascript-tasks-5/releases{/id}","created_at":"2015-10-28T11:07:30Z","updated_at":"2015-10-28T11:07:31Z","pushed_at":"2015-11-02T11:12:52Z","git_url":"git://github.com/lifeandfree/javascript-tasks-5.git","ssh_url":"git@github.com:lifeandfree/javascript-tasks-5.git","clone_url":"https://github.com/lifeandfree/javascript-tasks-5.git","svn_url":"https://github.com/lifeandfree/javascript-tasks-5","homepage":"","size":91,"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":"urfu-2015:master","ref":"master","sha":"aaaa19f89cdb130a30ee9a3cb0909cda7e43222b","user":{"login":"urfu-2015","id":14800971,"avatar_url":"https://avatars.githubusercontent.com/u/14800971?v=3","gravatar_id":"","url":"https://api.github.com/users/urfu-2015","html_url":"https://github.com/urfu-2015","followers_url":"https://api.github.com/users/urfu-2015/followers","following_url":"https://api.github.com/users/urfu-2015/following{/other_user}","gists_url":"https://api.github.com/users/urfu-2015/gists{/gist_id}","starred_url":"https://api.github.com/users/urfu-2015/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/urfu-2015/subscriptions","organizations_url":"https://api.github.com/users/urfu-2015/orgs","repos_url":"https://api.github.com/users/urfu-2015/repos","events_url":"https://api.github.com/users/urfu-2015/events{/privacy}","received_events_url":"https://api.github.com/users/urfu-2015/received_events","type":"Organization","site_admin":false},"repo":{"id":45039556,"name":"javascript-tasks-5","full_name":"urfu-2015/javascript-tasks-5","owner":{"login":"urfu-2015","id":14800971,"avatar_url":"https://avatars.githubusercontent.com/u/14800971?v=3","gravatar_id":"","url":"https://api.github.com/users/urfu-2015","html_url":"https://github.com/urfu-2015","followers_url":"https://api.github.com/users/urfu-2015/followers","following_url":"https://api.github.com/users/urfu-2015/following{/other_user}","gists_url":"https://api.github.com/users/urfu-2015/gists{/gist_id}","starred_url":"https://api.github.com/users/urfu-2015/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/urfu-2015/subscriptions","organizations_url":"https://api.github.com/users/urfu-2015/orgs","repos_url":"https://api.github.com/users/urfu-2015/repos","events_url":"https://api.github.com/users/urfu-2015/events{/privacy}","received_events_url":"https://api.github.com/users/urfu-2015/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/urfu-2015/javascript-tasks-5","description":"Задача к лекции «This / Bind / Call / Apply» – «Пора на лекцию»","fork":false,"url":"https://api.github.com/repos/urfu-2015/javascript-tasks-5","forks_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-5/forks","keys_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-5/keys{/key_id}","collaborators_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-5/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-5/teams","hooks_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-5/hooks","issue_events_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-5/issues/events{/number}","events_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-5/events","assignees_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-5/assignees{/user}","branches_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-5/branches{/branch}","tags_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-5/tags","blobs_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-5/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-5/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-5/git/refs{/sha}","trees_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-5/git/trees{/sha}","statuses_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-5/statuses/{sha}","languages_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-5/languages","stargazers_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-5/stargazers","contributors_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-5/contributors","subscribers_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-5/subscribers","subscription_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-5/subscription","commits_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-5/commits{/sha}","git_commits_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-5/git/commits{/sha}","comments_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-5/comments{/number}","issue_comment_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-5/issues/comments{/number}","contents_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-5/contents/{+path}","compare_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-5/compare/{base}...{head}","merges_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-5/merges","archive_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-5/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-5/downloads","issues_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-5/issues{/number}","pulls_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-5/pulls{/number}","milestones_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-5/milestones{/number}","notifications_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-5/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-5/labels{/name}","releases_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-5/releases{/id}","created_at":"2015-10-27T12:30:35Z","updated_at":"2015-10-27T13:29:31Z","pushed_at":"2015-11-05T20:48:07Z","git_url":"git://github.com/urfu-2015/javascript-tasks-5.git","ssh_url":"git@github.com:urfu-2015/javascript-tasks-5.git","clone_url":"https://github.com/urfu-2015/javascript-tasks-5.git","svn_url":"https://github.com/urfu-2015/javascript-tasks-5","homepage":"","size":1601,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":54,"mirror_url":null,"open_issues_count":40,"forks":54,"open_issues":40,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-5/pulls/24"},"html":{"href":"https://github.com/urfu-2015/javascript-tasks-5/pull/24"},"issue":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-5/issues/24"},"comments":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-5/issues/24/comments"},"review_comments":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-5/pulls/24/comments"},"review_comment":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-5/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-5/pulls/24/commits"},"statuses":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-5/statuses/e7f69bd5cd0a79530164af63442137ff2ef5134b"}}}}