{"action":"created","comment":{"url":"https://api.github.com/repos/urfu-2015/javascript-tasks-9/pulls/comments/46260605","id":46260605,"diff_hunk":"@@ -1 +1,45 @@\n 'use strict';\n+\n+module.exports.serial = function (functions, mainCallback) {\n+    var index = 0;\n+    var callback = function (error, data) {\n+        if (error || index === functions.length - 1) {\n+            mainCallback(error, data);\n+        };\n+        index = index + 1;\n+        if (index < functions.length) {\n+            functions[index](data, callback);\n+        };\n+    };\n+    functions[0](callback);\n+};\n+\n+module.exports.parallel = function (functions, mainCallback) {\n+    var counter = functions.length;\n+    var result = [];\n+    var callback = function (error, data) {\n+        counter = counter - 1;\n+        result.push(data);\n+        if (error || counter === 0) {\n+            mainCallback(error, result);","path":"lib/flow.js","position":24,"original_position":24,"commit_id":"5113a276836527bf6985f02225431213e9d87590","original_commit_id":"5113a276836527bf6985f02225431213e9d87590","user":{"login":"sameoldmadness","id":1537724,"avatar_url":"https://avatars.githubusercontent.com/u/1537724?v=3","gravatar_id":"","url":"https://api.github.com/users/sameoldmadness","html_url":"https://github.com/sameoldmadness","followers_url":"https://api.github.com/users/sameoldmadness/followers","following_url":"https://api.github.com/users/sameoldmadness/following{/other_user}","gists_url":"https://api.github.com/users/sameoldmadness/gists{/gist_id}","starred_url":"https://api.github.com/users/sameoldmadness/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sameoldmadness/subscriptions","organizations_url":"https://api.github.com/users/sameoldmadness/orgs","repos_url":"https://api.github.com/users/sameoldmadness/repos","events_url":"https://api.github.com/users/sameoldmadness/events{/privacy}","received_events_url":"https://api.github.com/users/sameoldmadness/received_events","type":"User","site_admin":false},"body":"Коллбэк вызывается несколько раз.","created_at":"2015-12-01T10:15:15Z","updated_at":"2015-12-01T10:15:15Z","html_url":"https://github.com/urfu-2015/javascript-tasks-9/pull/7#discussion_r46260605","pull_request_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-9/pulls/7","_links":{"self":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-9/pulls/comments/46260605"},"html":{"href":"https://github.com/urfu-2015/javascript-tasks-9/pull/7#discussion_r46260605"},"pull_request":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-9/pulls/7"}}},"pull_request":{"url":"https://api.github.com/repos/urfu-2015/javascript-tasks-9/pulls/7","id":52147298,"html_url":"https://github.com/urfu-2015/javascript-tasks-9/pull/7","diff_url":"https://github.com/urfu-2015/javascript-tasks-9/pull/7.diff","patch_url":"https://github.com/urfu-2015/javascript-tasks-9/pull/7.patch","issue_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-9/issues/7","number":7,"state":"open","locked":false,"title":"Хлуткова Анна.  ","user":{"login":"Anna1004","id":14961227,"avatar_url":"https://avatars.githubusercontent.com/u/14961227?v=3","gravatar_id":"","url":"https://api.github.com/users/Anna1004","html_url":"https://github.com/Anna1004","followers_url":"https://api.github.com/users/Anna1004/followers","following_url":"https://api.github.com/users/Anna1004/following{/other_user}","gists_url":"https://api.github.com/users/Anna1004/gists{/gist_id}","starred_url":"https://api.github.com/users/Anna1004/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Anna1004/subscriptions","organizations_url":"https://api.github.com/users/Anna1004/orgs","repos_url":"https://api.github.com/users/Anna1004/repos","events_url":"https://api.github.com/users/Anna1004/events{/privacy}","received_events_url":"https://api.github.com/users/Anna1004/received_events","type":"User","site_admin":false},"body":null,"created_at":"2015-11-30T16:38:39Z","updated_at":"2015-12-01T10:15:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6986db0f9e59b10c4e164c8d814253fb0f08f7ad","assignee":{"login":"sameoldmadness","id":1537724,"avatar_url":"https://avatars.githubusercontent.com/u/1537724?v=3","gravatar_id":"","url":"https://api.github.com/users/sameoldmadness","html_url":"https://github.com/sameoldmadness","followers_url":"https://api.github.com/users/sameoldmadness/followers","following_url":"https://api.github.com/users/sameoldmadness/following{/other_user}","gists_url":"https://api.github.com/users/sameoldmadness/gists{/gist_id}","starred_url":"https://api.github.com/users/sameoldmadness/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sameoldmadness/subscriptions","organizations_url":"https://api.github.com/users/sameoldmadness/orgs","repos_url":"https://api.github.com/users/sameoldmadness/repos","events_url":"https://api.github.com/users/sameoldmadness/events{/privacy}","received_events_url":"https://api.github.com/users/sameoldmadness/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-9/pulls/7/commits","review_comments_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-9/pulls/7/comments","review_comment_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-9/pulls/comments{/number}","comments_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-9/issues/7/comments","statuses_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-9/statuses/5113a276836527bf6985f02225431213e9d87590","head":{"label":"Anna1004:master","ref":"master","sha":"5113a276836527bf6985f02225431213e9d87590","user":{"login":"Anna1004","id":14961227,"avatar_url":"https://avatars.githubusercontent.com/u/14961227?v=3","gravatar_id":"","url":"https://api.github.com/users/Anna1004","html_url":"https://github.com/Anna1004","followers_url":"https://api.github.com/users/Anna1004/followers","following_url":"https://api.github.com/users/Anna1004/following{/other_user}","gists_url":"https://api.github.com/users/Anna1004/gists{/gist_id}","starred_url":"https://api.github.com/users/Anna1004/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Anna1004/subscriptions","organizations_url":"https://api.github.com/users/Anna1004/orgs","repos_url":"https://api.github.com/users/Anna1004/repos","events_url":"https://api.github.com/users/Anna1004/events{/privacy}","received_events_url":"https://api.github.com/users/Anna1004/received_events","type":"User","site_admin":false},"repo":{"id":46799917,"name":"javascript-tasks-9","full_name":"Anna1004/javascript-tasks-9","owner":{"login":"Anna1004","id":14961227,"avatar_url":"https://avatars.githubusercontent.com/u/14961227?v=3","gravatar_id":"","url":"https://api.github.com/users/Anna1004","html_url":"https://github.com/Anna1004","followers_url":"https://api.github.com/users/Anna1004/followers","following_url":"https://api.github.com/users/Anna1004/following{/other_user}","gists_url":"https://api.github.com/users/Anna1004/gists{/gist_id}","starred_url":"https://api.github.com/users/Anna1004/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Anna1004/subscriptions","organizations_url":"https://api.github.com/users/Anna1004/orgs","repos_url":"https://api.github.com/users/Anna1004/repos","events_url":"https://api.github.com/users/Anna1004/events{/privacy}","received_events_url":"https://api.github.com/users/Anna1004/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Anna1004/javascript-tasks-9","description":"","fork":true,"url":"https://api.github.com/repos/Anna1004/javascript-tasks-9","forks_url":"https://api.github.com/repos/Anna1004/javascript-tasks-9/forks","keys_url":"https://api.github.com/repos/Anna1004/javascript-tasks-9/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Anna1004/javascript-tasks-9/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Anna1004/javascript-tasks-9/teams","hooks_url":"https://api.github.com/repos/Anna1004/javascript-tasks-9/hooks","issue_events_url":"https://api.github.com/repos/Anna1004/javascript-tasks-9/issues/events{/number}","events_url":"https://api.github.com/repos/Anna1004/javascript-tasks-9/events","assignees_url":"https://api.github.com/repos/Anna1004/javascript-tasks-9/assignees{/user}","branches_url":"https://api.github.com/repos/Anna1004/javascript-tasks-9/branches{/branch}","tags_url":"https://api.github.com/repos/Anna1004/javascript-tasks-9/tags","blobs_url":"https://api.github.com/repos/Anna1004/javascript-tasks-9/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Anna1004/javascript-tasks-9/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Anna1004/javascript-tasks-9/git/refs{/sha}","trees_url":"https://api.github.com/repos/Anna1004/javascript-tasks-9/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Anna1004/javascript-tasks-9/statuses/{sha}","languages_url":"https://api.github.com/repos/Anna1004/javascript-tasks-9/languages","stargazers_url":"https://api.github.com/repos/Anna1004/javascript-tasks-9/stargazers","contributors_url":"https://api.github.com/repos/Anna1004/javascript-tasks-9/contributors","subscribers_url":"https://api.github.com/repos/Anna1004/javascript-tasks-9/subscribers","subscription_url":"https://api.github.com/repos/Anna1004/javascript-tasks-9/subscription","commits_url":"https://api.github.com/repos/Anna1004/javascript-tasks-9/commits{/sha}","git_commits_url":"https://api.github.com/repos/Anna1004/javascript-tasks-9/git/commits{/sha}","comments_url":"https://api.github.com/repos/Anna1004/javascript-tasks-9/comments{/number}","issue_comment_url":"https://api.github.com/repos/Anna1004/javascript-tasks-9/issues/comments{/number}","contents_url":"https://api.github.com/repos/Anna1004/javascript-tasks-9/contents/{+path}","compare_url":"https://api.github.com/repos/Anna1004/javascript-tasks-9/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Anna1004/javascript-tasks-9/merges","archive_url":"https://api.github.com/repos/Anna1004/javascript-tasks-9/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Anna1004/javascript-tasks-9/downloads","issues_url":"https://api.github.com/repos/Anna1004/javascript-tasks-9/issues{/number}","pulls_url":"https://api.github.com/repos/Anna1004/javascript-tasks-9/pulls{/number}","milestones_url":"https://api.github.com/repos/Anna1004/javascript-tasks-9/milestones{/number}","notifications_url":"https://api.github.com/repos/Anna1004/javascript-tasks-9/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Anna1004/javascript-tasks-9/labels{/name}","releases_url":"https://api.github.com/repos/Anna1004/javascript-tasks-9/releases{/id}","created_at":"2015-11-24T15:20:30Z","updated_at":"2015-11-24T15:20:31Z","pushed_at":"2015-11-30T16:38:33Z","git_url":"git://github.com/Anna1004/javascript-tasks-9.git","ssh_url":"git@github.com:Anna1004/javascript-tasks-9.git","clone_url":"https://github.com/Anna1004/javascript-tasks-9.git","svn_url":"https://github.com/Anna1004/javascript-tasks-9","homepage":null,"size":5,"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":"aa6a47ebfb10aa4abdb06e05af3644dd1cfe890d","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":46787587,"name":"javascript-tasks-9","full_name":"urfu-2015/javascript-tasks-9","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-9","description":"","fork":false,"url":"https://api.github.com/repos/urfu-2015/javascript-tasks-9","forks_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-9/forks","keys_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-9/keys{/key_id}","collaborators_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-9/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-9/teams","hooks_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-9/hooks","issue_events_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-9/issues/events{/number}","events_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-9/events","assignees_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-9/assignees{/user}","branches_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-9/branches{/branch}","tags_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-9/tags","blobs_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-9/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-9/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-9/git/refs{/sha}","trees_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-9/git/trees{/sha}","statuses_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-9/statuses/{sha}","languages_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-9/languages","stargazers_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-9/stargazers","contributors_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-9/contributors","subscribers_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-9/subscribers","subscription_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-9/subscription","commits_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-9/commits{/sha}","git_commits_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-9/git/commits{/sha}","comments_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-9/comments{/number}","issue_comment_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-9/issues/comments{/number}","contents_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-9/contents/{+path}","compare_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-9/compare/{base}...{head}","merges_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-9/merges","archive_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-9/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-9/downloads","issues_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-9/issues{/number}","pulls_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-9/pulls{/number}","milestones_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-9/milestones{/number}","notifications_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-9/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-9/labels{/name}","releases_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-9/releases{/id}","created_at":"2015-11-24T11:30:43Z","updated_at":"2015-11-24T15:16:47Z","pushed_at":"2015-12-01T04:32:55Z","git_url":"git://github.com/urfu-2015/javascript-tasks-9.git","ssh_url":"git@github.com:urfu-2015/javascript-tasks-9.git","clone_url":"https://github.com/urfu-2015/javascript-tasks-9.git","svn_url":"https://github.com/urfu-2015/javascript-tasks-9","homepage":null,"size":5,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":37,"mirror_url":null,"open_issues_count":30,"forks":37,"open_issues":30,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-9/pulls/7"},"html":{"href":"https://github.com/urfu-2015/javascript-tasks-9/pull/7"},"issue":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-9/issues/7"},"comments":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-9/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-9/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-9/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-9/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-9/statuses/5113a276836527bf6985f02225431213e9d87590"}}}}