{"action":"created","comment":{"url":"https://api.github.com/repos/urfu-2015/javascript-tasks-2/pulls/comments/42603118","id":42603118,"diff_hunk":"@@ -1,34 +1,67 @@\n 'use strict';\n \n-var phoneBook; // Здесь вы храните записи как хотите\n+var phoneBook = []; // Здесь вы храните записи как хотите\n \n /*\n    Функция добавления записи в телефонную книгу.\n    На вход может прийти что угодно, будьте осторожны.\n */\n module.exports.add = function add(name, phone, email) {\n-\n-    // Ваша невероятная магия здесь\n-\n+    if (isValidName(name) && isValidPhone(phone) && isValidEmail(email)){\n+        phoneBook.push({name:name, phone:phone, email:email, hash:name+';'+phone+';'+email});\n+        console.log('Запись', name, phone, email, 'добавлена')\n+    }\n+    console.log('Запись', name, phone, email, 'не корректна')\n };\n \n+function isValidEmail(email) {\n+    if (email==='') {","path":"phoneBook.js","position":22,"original_position":22,"commit_id":"20f224a16d1051f55d1a7ee8fd1d7d33c1741c44","original_commit_id":"20f224a16d1051f55d1a7ee8fd1d7d33c1741c44","user":{"login":"gogoleff","id":4534405,"avatar_url":"https://avatars.githubusercontent.com/u/4534405?v=3","gravatar_id":"","url":"https://api.github.com/users/gogoleff","html_url":"https://github.com/gogoleff","followers_url":"https://api.github.com/users/gogoleff/followers","following_url":"https://api.github.com/users/gogoleff/following{/other_user}","gists_url":"https://api.github.com/users/gogoleff/gists{/gist_id}","starred_url":"https://api.github.com/users/gogoleff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gogoleff/subscriptions","organizations_url":"https://api.github.com/users/gogoleff/orgs","repos_url":"https://api.github.com/users/gogoleff/repos","events_url":"https://api.github.com/users/gogoleff/events{/privacy}","received_events_url":"https://api.github.com/users/gogoleff/received_events","type":"User","site_admin":false},"body":"Проверить надо не только на пустую строку, но и что он вообще пришёл, и он строка","created_at":"2015-10-21T09:45:57Z","updated_at":"2015-10-21T09:45:57Z","html_url":"https://github.com/urfu-2015/javascript-tasks-2/pull/75#discussion_r42603118","pull_request_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-2/pulls/75","_links":{"self":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-2/pulls/comments/42603118"},"html":{"href":"https://github.com/urfu-2015/javascript-tasks-2/pull/75#discussion_r42603118"},"pull_request":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-2/pulls/75"}}},"pull_request":{"url":"https://api.github.com/repos/urfu-2015/javascript-tasks-2/pulls/75","id":47502074,"html_url":"https://github.com/urfu-2015/javascript-tasks-2/pull/75","diff_url":"https://github.com/urfu-2015/javascript-tasks-2/pull/75.diff","patch_url":"https://github.com/urfu-2015/javascript-tasks-2/pull/75.patch","issue_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-2/issues/75","number":75,"state":"open","locked":false,"title":"Гусева Зинаида","user":{"login":"zingus4","id":14993103,"avatar_url":"https://avatars.githubusercontent.com/u/14993103?v=3","gravatar_id":"","url":"https://api.github.com/users/zingus4","html_url":"https://github.com/zingus4","followers_url":"https://api.github.com/users/zingus4/followers","following_url":"https://api.github.com/users/zingus4/following{/other_user}","gists_url":"https://api.github.com/users/zingus4/gists{/gist_id}","starred_url":"https://api.github.com/users/zingus4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zingus4/subscriptions","organizations_url":"https://api.github.com/users/zingus4/orgs","repos_url":"https://api.github.com/users/zingus4/repos","events_url":"https://api.github.com/users/zingus4/events{/privacy}","received_events_url":"https://api.github.com/users/zingus4/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-10-13T08:07:22Z","updated_at":"2015-10-21T09:45:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0f477958927292e1d68135e0b676005b70d9dc4a","assignee":{"login":"gogoleff","id":4534405,"avatar_url":"https://avatars.githubusercontent.com/u/4534405?v=3","gravatar_id":"","url":"https://api.github.com/users/gogoleff","html_url":"https://github.com/gogoleff","followers_url":"https://api.github.com/users/gogoleff/followers","following_url":"https://api.github.com/users/gogoleff/following{/other_user}","gists_url":"https://api.github.com/users/gogoleff/gists{/gist_id}","starred_url":"https://api.github.com/users/gogoleff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gogoleff/subscriptions","organizations_url":"https://api.github.com/users/gogoleff/orgs","repos_url":"https://api.github.com/users/gogoleff/repos","events_url":"https://api.github.com/users/gogoleff/events{/privacy}","received_events_url":"https://api.github.com/users/gogoleff/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-2/pulls/75/commits","review_comments_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-2/pulls/75/comments","review_comment_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-2/issues/75/comments","statuses_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-2/statuses/20f224a16d1051f55d1a7ee8fd1d7d33c1741c44","head":{"label":"zingus4:master","ref":"master","sha":"20f224a16d1051f55d1a7ee8fd1d7d33c1741c44","user":{"login":"zingus4","id":14993103,"avatar_url":"https://avatars.githubusercontent.com/u/14993103?v=3","gravatar_id":"","url":"https://api.github.com/users/zingus4","html_url":"https://github.com/zingus4","followers_url":"https://api.github.com/users/zingus4/followers","following_url":"https://api.github.com/users/zingus4/following{/other_user}","gists_url":"https://api.github.com/users/zingus4/gists{/gist_id}","starred_url":"https://api.github.com/users/zingus4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zingus4/subscriptions","organizations_url":"https://api.github.com/users/zingus4/orgs","repos_url":"https://api.github.com/users/zingus4/repos","events_url":"https://api.github.com/users/zingus4/events{/privacy}","received_events_url":"https://api.github.com/users/zingus4/received_events","type":"User","site_admin":false},"repo":{"id":44161173,"name":"javascript-tasks-2","full_name":"zingus4/javascript-tasks-2","owner":{"login":"zingus4","id":14993103,"avatar_url":"https://avatars.githubusercontent.com/u/14993103?v=3","gravatar_id":"","url":"https://api.github.com/users/zingus4","html_url":"https://github.com/zingus4","followers_url":"https://api.github.com/users/zingus4/followers","following_url":"https://api.github.com/users/zingus4/following{/other_user}","gists_url":"https://api.github.com/users/zingus4/gists{/gist_id}","starred_url":"https://api.github.com/users/zingus4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zingus4/subscriptions","organizations_url":"https://api.github.com/users/zingus4/orgs","repos_url":"https://api.github.com/users/zingus4/repos","events_url":"https://api.github.com/users/zingus4/events{/privacy}","received_events_url":"https://api.github.com/users/zingus4/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zingus4/javascript-tasks-2","description":"Задача к лекции «Основы Javascript» – «Телефонная книга»","fork":true,"url":"https://api.github.com/repos/zingus4/javascript-tasks-2","forks_url":"https://api.github.com/repos/zingus4/javascript-tasks-2/forks","keys_url":"https://api.github.com/repos/zingus4/javascript-tasks-2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zingus4/javascript-tasks-2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zingus4/javascript-tasks-2/teams","hooks_url":"https://api.github.com/repos/zingus4/javascript-tasks-2/hooks","issue_events_url":"https://api.github.com/repos/zingus4/javascript-tasks-2/issues/events{/number}","events_url":"https://api.github.com/repos/zingus4/javascript-tasks-2/events","assignees_url":"https://api.github.com/repos/zingus4/javascript-tasks-2/assignees{/user}","branches_url":"https://api.github.com/repos/zingus4/javascript-tasks-2/branches{/branch}","tags_url":"https://api.github.com/repos/zingus4/javascript-tasks-2/tags","blobs_url":"https://api.github.com/repos/zingus4/javascript-tasks-2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zingus4/javascript-tasks-2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zingus4/javascript-tasks-2/git/refs{/sha}","trees_url":"https://api.github.com/repos/zingus4/javascript-tasks-2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zingus4/javascript-tasks-2/statuses/{sha}","languages_url":"https://api.github.com/repos/zingus4/javascript-tasks-2/languages","stargazers_url":"https://api.github.com/repos/zingus4/javascript-tasks-2/stargazers","contributors_url":"https://api.github.com/repos/zingus4/javascript-tasks-2/contributors","subscribers_url":"https://api.github.com/repos/zingus4/javascript-tasks-2/subscribers","subscription_url":"https://api.github.com/repos/zingus4/javascript-tasks-2/subscription","commits_url":"https://api.github.com/repos/zingus4/javascript-tasks-2/commits{/sha}","git_commits_url":"https://api.github.com/repos/zingus4/javascript-tasks-2/git/commits{/sha}","comments_url":"https://api.github.com/repos/zingus4/javascript-tasks-2/comments{/number}","issue_comment_url":"https://api.github.com/repos/zingus4/javascript-tasks-2/issues/comments{/number}","contents_url":"https://api.github.com/repos/zingus4/javascript-tasks-2/contents/{+path}","compare_url":"https://api.github.com/repos/zingus4/javascript-tasks-2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zingus4/javascript-tasks-2/merges","archive_url":"https://api.github.com/repos/zingus4/javascript-tasks-2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zingus4/javascript-tasks-2/downloads","issues_url":"https://api.github.com/repos/zingus4/javascript-tasks-2/issues{/number}","pulls_url":"https://api.github.com/repos/zingus4/javascript-tasks-2/pulls{/number}","milestones_url":"https://api.github.com/repos/zingus4/javascript-tasks-2/milestones{/number}","notifications_url":"https://api.github.com/repos/zingus4/javascript-tasks-2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zingus4/javascript-tasks-2/labels{/name}","releases_url":"https://api.github.com/repos/zingus4/javascript-tasks-2/releases{/id}","created_at":"2015-10-13T08:01:32Z","updated_at":"2015-10-13T08:01:33Z","pushed_at":"2015-10-21T08:59:52Z","git_url":"git://github.com/zingus4/javascript-tasks-2.git","ssh_url":"git@github.com:zingus4/javascript-tasks-2.git","clone_url":"https://github.com/zingus4/javascript-tasks-2.git","svn_url":"https://github.com/zingus4/javascript-tasks-2","homepage":"","size":101,"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":"8964185d6a3c6c2b9c54b4480137e874d6fbd374","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":43743710,"name":"javascript-tasks-2","full_name":"urfu-2015/javascript-tasks-2","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-2","description":"Задача к лекции «Основы Javascript» – «Телефонная книга»","fork":false,"url":"https://api.github.com/repos/urfu-2015/javascript-tasks-2","forks_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-2/forks","keys_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-2/teams","hooks_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-2/hooks","issue_events_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-2/issues/events{/number}","events_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-2/events","assignees_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-2/assignees{/user}","branches_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-2/branches{/branch}","tags_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-2/tags","blobs_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-2/git/refs{/sha}","trees_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-2/statuses/{sha}","languages_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-2/languages","stargazers_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-2/stargazers","contributors_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-2/contributors","subscribers_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-2/subscribers","subscription_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-2/subscription","commits_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-2/commits{/sha}","git_commits_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-2/git/commits{/sha}","comments_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-2/comments{/number}","issue_comment_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-2/issues/comments{/number}","contents_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-2/contents/{+path}","compare_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-2/merges","archive_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-2/downloads","issues_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-2/issues{/number}","pulls_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-2/pulls{/number}","milestones_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-2/milestones{/number}","notifications_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-2/labels{/name}","releases_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-2/releases{/id}","created_at":"2015-10-06T10:22:05Z","updated_at":"2015-10-10T17:56:49Z","pushed_at":"2015-10-21T08:59:52Z","git_url":"git://github.com/urfu-2015/javascript-tasks-2.git","ssh_url":"git@github.com:urfu-2015/javascript-tasks-2.git","clone_url":"https://github.com/urfu-2015/javascript-tasks-2.git","svn_url":"https://github.com/urfu-2015/javascript-tasks-2","homepage":"","size":1546,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":98,"mirror_url":null,"open_issues_count":39,"forks":98,"open_issues":39,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-2/pulls/75"},"html":{"href":"https://github.com/urfu-2015/javascript-tasks-2/pull/75"},"issue":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-2/issues/75"},"comments":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-2/issues/75/comments"},"review_comments":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-2/pulls/75/comments"},"review_comment":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-2/pulls/75/commits"},"statuses":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-2/statuses/20f224a16d1051f55d1a7ee8fd1d7d33c1741c44"}}}}