{"action":"created","comment":{"url":"https://api.github.com/repos/urfu-2018/javascript-task-2/pulls/comments/228740510","pull_request_review_id":169084117,"id":228740510,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyODc0MDUxMA==","diff_hunk":"@@ -39,7 +71,23 @@ function update(phone, name, email) {\n  * @returns {Number}\n  */\n function findAndRemove(query) {\n+    if (!notEmptyString(query)) {\n+        return 0;\n+    }\n+\n+    return find(query).map(entry =>\n+        delete phoneBook[entry.split(',')[1].match(/\\d(\\d+)/g).join('')]).length;\n+}\n \n+/**\n+ * Проверяет, является строка подстрокой хотя бы одного элемента массива\n+ * @param {String[]} arr\n+ * @param {String} query\n+ * @returns {Boolean}\n+ */\n+function arrayIncludes(arr, query) {\n+    return arr.map(str => str !== undefined && str.includes(query))","path":"phone-book.js","position":76,"original_position":76,"commit_id":"04374625d65b92c963dc5a8cfef84660a2471fc7","original_commit_id":"04374625d65b92c963dc5a8cfef84660a2471fc7","user":{"login":"MonstraG","id":17963791,"node_id":"MDQ6VXNlcjE3OTYzNzkx","avatar_url":"https://avatars1.githubusercontent.com/u/17963791?v=4","gravatar_id":"","url":"https://api.github.com/users/MonstraG","html_url":"https://github.com/MonstraG","followers_url":"https://api.github.com/users/MonstraG/followers","following_url":"https://api.github.com/users/MonstraG/following{/other_user}","gists_url":"https://api.github.com/users/MonstraG/gists{/gist_id}","starred_url":"https://api.github.com/users/MonstraG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MonstraG/subscriptions","organizations_url":"https://api.github.com/users/MonstraG/orgs","repos_url":"https://api.github.com/users/MonstraG/repos","events_url":"https://api.github.com/users/MonstraG/events{/privacy}","received_events_url":"https://api.github.com/users/MonstraG/received_events","type":"User","site_admin":false},"body":"Я, на самом деле, стараюсь избегать проверок типа if (переменная) поскольку мне (и наверное не только мне) не очевидно, какой результат будет она давать при всех возможных значениях: undefined, '', 'a', NaN, null и т.д. Одновременно, я стараюсь пройти тесты, которые могут содержать любые из них, и я не знаю какие, из-за чего мне приходится значительно уточнять проверки и пытатся изолировать их.\r\n","created_at":"2018-10-28T09:12:20Z","updated_at":"2018-10-28T09:12:20Z","html_url":"https://github.com/urfu-2018/javascript-task-2/pull/36#discussion_r228740510","pull_request_url":"https://api.github.com/repos/urfu-2018/javascript-task-2/pulls/36","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/urfu-2018/javascript-task-2/pulls/comments/228740510"},"html":{"href":"https://github.com/urfu-2018/javascript-task-2/pull/36#discussion_r228740510"},"pull_request":{"href":"https://api.github.com/repos/urfu-2018/javascript-task-2/pulls/36"}},"in_reply_to_id":228737809},"pull_request":{"url":"https://api.github.com/repos/urfu-2018/javascript-task-2/pulls/36","id":224760002,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI0NzYwMDAy","html_url":"https://github.com/urfu-2018/javascript-task-2/pull/36","diff_url":"https://github.com/urfu-2018/javascript-task-2/pull/36.diff","patch_url":"https://github.com/urfu-2018/javascript-task-2/pull/36.patch","issue_url":"https://api.github.com/repos/urfu-2018/javascript-task-2/issues/36","number":36,"state":"closed","locked":false,"title":"Гарелышев Арсений","user":{"login":"MonstraG","id":17963791,"node_id":"MDQ6VXNlcjE3OTYzNzkx","avatar_url":"https://avatars1.githubusercontent.com/u/17963791?v=4","gravatar_id":"","url":"https://api.github.com/users/MonstraG","html_url":"https://github.com/MonstraG","followers_url":"https://api.github.com/users/MonstraG/followers","following_url":"https://api.github.com/users/MonstraG/following{/other_user}","gists_url":"https://api.github.com/users/MonstraG/gists{/gist_id}","starred_url":"https://api.github.com/users/MonstraG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MonstraG/subscriptions","organizations_url":"https://api.github.com/users/MonstraG/orgs","repos_url":"https://api.github.com/users/MonstraG/repos","events_url":"https://api.github.com/users/MonstraG/events{/privacy}","received_events_url":"https://api.github.com/users/MonstraG/received_events","type":"User","site_admin":false},"body":"Да начнется борьба с скрытыми тестами!","created_at":"2018-10-22T17:53:19Z","updated_at":"2018-10-28T09:12:20Z","closed_at":"2018-10-28T08:01:55Z","merged_at":null,"merge_commit_sha":"242147962fcf1c2c504fbf52da68b3563ada9dcf","assignee":{"login":"ulitcos","id":4023479,"node_id":"MDQ6VXNlcjQwMjM0Nzk=","avatar_url":"https://avatars2.githubusercontent.com/u/4023479?v=4","gravatar_id":"","url":"https://api.github.com/users/ulitcos","html_url":"https://github.com/ulitcos","followers_url":"https://api.github.com/users/ulitcos/followers","following_url":"https://api.github.com/users/ulitcos/following{/other_user}","gists_url":"https://api.github.com/users/ulitcos/gists{/gist_id}","starred_url":"https://api.github.com/users/ulitcos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ulitcos/subscriptions","organizations_url":"https://api.github.com/users/ulitcos/orgs","repos_url":"https://api.github.com/users/ulitcos/repos","events_url":"https://api.github.com/users/ulitcos/events{/privacy}","received_events_url":"https://api.github.com/users/ulitcos/received_events","type":"User","site_admin":false},"assignees":[{"login":"ulitcos","id":4023479,"node_id":"MDQ6VXNlcjQwMjM0Nzk=","avatar_url":"https://avatars2.githubusercontent.com/u/4023479?v=4","gravatar_id":"","url":"https://api.github.com/users/ulitcos","html_url":"https://github.com/ulitcos","followers_url":"https://api.github.com/users/ulitcos/followers","following_url":"https://api.github.com/users/ulitcos/following{/other_user}","gists_url":"https://api.github.com/users/ulitcos/gists{/gist_id}","starred_url":"https://api.github.com/users/ulitcos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ulitcos/subscriptions","organizations_url":"https://api.github.com/users/ulitcos/orgs","repos_url":"https://api.github.com/users/ulitcos/repos","events_url":"https://api.github.com/users/ulitcos/events{/privacy}","received_events_url":"https://api.github.com/users/ulitcos/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":1095821485,"node_id":"MDU6TGFiZWwxMDk1ODIxNDg1","url":"https://api.github.com/repos/urfu-2018/javascript-task-2/labels/accepted","name":"accepted","color":"00a804","default":false},{"id":1095821512,"node_id":"MDU6TGFiZWwxMDk1ODIxNTEy","url":"https://api.github.com/repos/urfu-2018/javascript-task-2/labels/extra","name":"extra","color":"fbca04","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/urfu-2018/javascript-task-2/pulls/36/commits","review_comments_url":"https://api.github.com/repos/urfu-2018/javascript-task-2/pulls/36/comments","review_comment_url":"https://api.github.com/repos/urfu-2018/javascript-task-2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/urfu-2018/javascript-task-2/issues/36/comments","statuses_url":"https://api.github.com/repos/urfu-2018/javascript-task-2/statuses/04374625d65b92c963dc5a8cfef84660a2471fc7","head":{"label":"MonstraG:master","ref":"master","sha":"04374625d65b92c963dc5a8cfef84660a2471fc7","user":{"login":"MonstraG","id":17963791,"node_id":"MDQ6VXNlcjE3OTYzNzkx","avatar_url":"https://avatars1.githubusercontent.com/u/17963791?v=4","gravatar_id":"","url":"https://api.github.com/users/MonstraG","html_url":"https://github.com/MonstraG","followers_url":"https://api.github.com/users/MonstraG/followers","following_url":"https://api.github.com/users/MonstraG/following{/other_user}","gists_url":"https://api.github.com/users/MonstraG/gists{/gist_id}","starred_url":"https://api.github.com/users/MonstraG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MonstraG/subscriptions","organizations_url":"https://api.github.com/users/MonstraG/orgs","repos_url":"https://api.github.com/users/MonstraG/repos","events_url":"https://api.github.com/users/MonstraG/events{/privacy}","received_events_url":"https://api.github.com/users/MonstraG/received_events","type":"User","site_admin":false},"repo":{"id":154111731,"node_id":"MDEwOlJlcG9zaXRvcnkxNTQxMTE3MzE=","name":"javascript-task-2","full_name":"MonstraG/javascript-task-2","private":false,"owner":{"login":"MonstraG","id":17963791,"node_id":"MDQ6VXNlcjE3OTYzNzkx","avatar_url":"https://avatars1.githubusercontent.com/u/17963791?v=4","gravatar_id":"","url":"https://api.github.com/users/MonstraG","html_url":"https://github.com/MonstraG","followers_url":"https://api.github.com/users/MonstraG/followers","following_url":"https://api.github.com/users/MonstraG/following{/other_user}","gists_url":"https://api.github.com/users/MonstraG/gists{/gist_id}","starred_url":"https://api.github.com/users/MonstraG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MonstraG/subscriptions","organizations_url":"https://api.github.com/users/MonstraG/orgs","repos_url":"https://api.github.com/users/MonstraG/repos","events_url":"https://api.github.com/users/MonstraG/events{/privacy}","received_events_url":"https://api.github.com/users/MonstraG/received_events","type":"User","site_admin":false},"html_url":"https://github.com/MonstraG/javascript-task-2","description":"Задача «Телефонная книга Аркадия»","fork":true,"url":"https://api.github.com/repos/MonstraG/javascript-task-2","forks_url":"https://api.github.com/repos/MonstraG/javascript-task-2/forks","keys_url":"https://api.github.com/repos/MonstraG/javascript-task-2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MonstraG/javascript-task-2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MonstraG/javascript-task-2/teams","hooks_url":"https://api.github.com/repos/MonstraG/javascript-task-2/hooks","issue_events_url":"https://api.github.com/repos/MonstraG/javascript-task-2/issues/events{/number}","events_url":"https://api.github.com/repos/MonstraG/javascript-task-2/events","assignees_url":"https://api.github.com/repos/MonstraG/javascript-task-2/assignees{/user}","branches_url":"https://api.github.com/repos/MonstraG/javascript-task-2/branches{/branch}","tags_url":"https://api.github.com/repos/MonstraG/javascript-task-2/tags","blobs_url":"https://api.github.com/repos/MonstraG/javascript-task-2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MonstraG/javascript-task-2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MonstraG/javascript-task-2/git/refs{/sha}","trees_url":"https://api.github.com/repos/MonstraG/javascript-task-2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MonstraG/javascript-task-2/statuses/{sha}","languages_url":"https://api.github.com/repos/MonstraG/javascript-task-2/languages","stargazers_url":"https://api.github.com/repos/MonstraG/javascript-task-2/stargazers","contributors_url":"https://api.github.com/repos/MonstraG/javascript-task-2/contributors","subscribers_url":"https://api.github.com/repos/MonstraG/javascript-task-2/subscribers","subscription_url":"https://api.github.com/repos/MonstraG/javascript-task-2/subscription","commits_url":"https://api.github.com/repos/MonstraG/javascript-task-2/commits{/sha}","git_commits_url":"https://api.github.com/repos/MonstraG/javascript-task-2/git/commits{/sha}","comments_url":"https://api.github.com/repos/MonstraG/javascript-task-2/comments{/number}","issue_comment_url":"https://api.github.com/repos/MonstraG/javascript-task-2/issues/comments{/number}","contents_url":"https://api.github.com/repos/MonstraG/javascript-task-2/contents/{+path}","compare_url":"https://api.github.com/repos/MonstraG/javascript-task-2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MonstraG/javascript-task-2/merges","archive_url":"https://api.github.com/repos/MonstraG/javascript-task-2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MonstraG/javascript-task-2/downloads","issues_url":"https://api.github.com/repos/MonstraG/javascript-task-2/issues{/number}","pulls_url":"https://api.github.com/repos/MonstraG/javascript-task-2/pulls{/number}","milestones_url":"https://api.github.com/repos/MonstraG/javascript-task-2/milestones{/number}","notifications_url":"https://api.github.com/repos/MonstraG/javascript-task-2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MonstraG/javascript-task-2/labels{/name}","releases_url":"https://api.github.com/repos/MonstraG/javascript-task-2/releases{/id}","deployments_url":"https://api.github.com/repos/MonstraG/javascript-task-2/deployments","created_at":"2018-10-22T08:40:51Z","updated_at":"2018-10-24T04:20:44Z","pushed_at":"2018-10-24T04:20:42Z","git_url":"git://github.com/MonstraG/javascript-task-2.git","ssh_url":"git@github.com:MonstraG/javascript-task-2.git","clone_url":"https://github.com/MonstraG/javascript-task-2.git","svn_url":"https://github.com/MonstraG/javascript-task-2","homepage":"","size":31,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"urfu-2018:master","ref":"master","sha":"c5e2562d6428c01e820111fc21f3e7f13f848d55","user":{"login":"urfu-2018","id":43127233,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQzMTI3MjMz","avatar_url":"https://avatars0.githubusercontent.com/u/43127233?v=4","gravatar_id":"","url":"https://api.github.com/users/urfu-2018","html_url":"https://github.com/urfu-2018","followers_url":"https://api.github.com/users/urfu-2018/followers","following_url":"https://api.github.com/users/urfu-2018/following{/other_user}","gists_url":"https://api.github.com/users/urfu-2018/gists{/gist_id}","starred_url":"https://api.github.com/users/urfu-2018/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/urfu-2018/subscriptions","organizations_url":"https://api.github.com/users/urfu-2018/orgs","repos_url":"https://api.github.com/users/urfu-2018/repos","events_url":"https://api.github.com/users/urfu-2018/events{/privacy}","received_events_url":"https://api.github.com/users/urfu-2018/received_events","type":"Organization","site_admin":false},"repo":{"id":153625667,"node_id":"MDEwOlJlcG9zaXRvcnkxNTM2MjU2Njc=","name":"javascript-task-2","full_name":"urfu-2018/javascript-task-2","private":false,"owner":{"login":"urfu-2018","id":43127233,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQzMTI3MjMz","avatar_url":"https://avatars0.githubusercontent.com/u/43127233?v=4","gravatar_id":"","url":"https://api.github.com/users/urfu-2018","html_url":"https://github.com/urfu-2018","followers_url":"https://api.github.com/users/urfu-2018/followers","following_url":"https://api.github.com/users/urfu-2018/following{/other_user}","gists_url":"https://api.github.com/users/urfu-2018/gists{/gist_id}","starred_url":"https://api.github.com/users/urfu-2018/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/urfu-2018/subscriptions","organizations_url":"https://api.github.com/users/urfu-2018/orgs","repos_url":"https://api.github.com/users/urfu-2018/repos","events_url":"https://api.github.com/users/urfu-2018/events{/privacy}","received_events_url":"https://api.github.com/users/urfu-2018/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/urfu-2018/javascript-task-2","description":"Задача «Телефонная книга Аркадия»","fork":false,"url":"https://api.github.com/repos/urfu-2018/javascript-task-2","forks_url":"https://api.github.com/repos/urfu-2018/javascript-task-2/forks","keys_url":"https://api.github.com/repos/urfu-2018/javascript-task-2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/urfu-2018/javascript-task-2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/urfu-2018/javascript-task-2/teams","hooks_url":"https://api.github.com/repos/urfu-2018/javascript-task-2/hooks","issue_events_url":"https://api.github.com/repos/urfu-2018/javascript-task-2/issues/events{/number}","events_url":"https://api.github.com/repos/urfu-2018/javascript-task-2/events","assignees_url":"https://api.github.com/repos/urfu-2018/javascript-task-2/assignees{/user}","branches_url":"https://api.github.com/repos/urfu-2018/javascript-task-2/branches{/branch}","tags_url":"https://api.github.com/repos/urfu-2018/javascript-task-2/tags","blobs_url":"https://api.github.com/repos/urfu-2018/javascript-task-2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/urfu-2018/javascript-task-2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/urfu-2018/javascript-task-2/git/refs{/sha}","trees_url":"https://api.github.com/repos/urfu-2018/javascript-task-2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/urfu-2018/javascript-task-2/statuses/{sha}","languages_url":"https://api.github.com/repos/urfu-2018/javascript-task-2/languages","stargazers_url":"https://api.github.com/repos/urfu-2018/javascript-task-2/stargazers","contributors_url":"https://api.github.com/repos/urfu-2018/javascript-task-2/contributors","subscribers_url":"https://api.github.com/repos/urfu-2018/javascript-task-2/subscribers","subscription_url":"https://api.github.com/repos/urfu-2018/javascript-task-2/subscription","commits_url":"https://api.github.com/repos/urfu-2018/javascript-task-2/commits{/sha}","git_commits_url":"https://api.github.com/repos/urfu-2018/javascript-task-2/git/commits{/sha}","comments_url":"https://api.github.com/repos/urfu-2018/javascript-task-2/comments{/number}","issue_comment_url":"https://api.github.com/repos/urfu-2018/javascript-task-2/issues/comments{/number}","contents_url":"https://api.github.com/repos/urfu-2018/javascript-task-2/contents/{+path}","compare_url":"https://api.github.com/repos/urfu-2018/javascript-task-2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/urfu-2018/javascript-task-2/merges","archive_url":"https://api.github.com/repos/urfu-2018/javascript-task-2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/urfu-2018/javascript-task-2/downloads","issues_url":"https://api.github.com/repos/urfu-2018/javascript-task-2/issues{/number}","pulls_url":"https://api.github.com/repos/urfu-2018/javascript-task-2/pulls{/number}","milestones_url":"https://api.github.com/repos/urfu-2018/javascript-task-2/milestones{/number}","notifications_url":"https://api.github.com/repos/urfu-2018/javascript-task-2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/urfu-2018/javascript-task-2/labels{/name}","releases_url":"https://api.github.com/repos/urfu-2018/javascript-task-2/releases{/id}","deployments_url":"https://api.github.com/repos/urfu-2018/javascript-task-2/deployments","created_at":"2018-10-18T13:09:54Z","updated_at":"2018-10-18T13:25:40Z","pushed_at":"2018-10-28T08:20:11Z","git_url":"git://github.com/urfu-2018/javascript-task-2.git","ssh_url":"git@github.com:urfu-2018/javascript-task-2.git","clone_url":"https://github.com/urfu-2018/javascript-task-2.git","svn_url":"https://github.com/urfu-2018/javascript-task-2","homepage":"","size":15,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":127,"mirror_url":null,"archived":false,"open_issues_count":75,"license":null,"forks":127,"open_issues":75,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/urfu-2018/javascript-task-2/pulls/36"},"html":{"href":"https://github.com/urfu-2018/javascript-task-2/pull/36"},"issue":{"href":"https://api.github.com/repos/urfu-2018/javascript-task-2/issues/36"},"comments":{"href":"https://api.github.com/repos/urfu-2018/javascript-task-2/issues/36/comments"},"review_comments":{"href":"https://api.github.com/repos/urfu-2018/javascript-task-2/pulls/36/comments"},"review_comment":{"href":"https://api.github.com/repos/urfu-2018/javascript-task-2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/urfu-2018/javascript-task-2/pulls/36/commits"},"statuses":{"href":"https://api.github.com/repos/urfu-2018/javascript-task-2/statuses/04374625d65b92c963dc5a8cfef84660a2471fc7"}},"author_association":"NONE"}}
{"actor":{"display_login":"MonstraG"}}