{"action":"created","comment":{"url":"https://api.github.com/repos/htmlacademy-javascript/243875-keksobooking/pulls/comments/222781190","pull_request_review_id":161751586,"id":222781190,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMjc4MTE5MA==","diff_hunk":"@@ -0,0 +1,71 @@\n+'use strict';\n+(function () {\n+  var mainPin = document.querySelector('.map__pin--main');\n+  var filterValues = {\n+    'housing-type': 'any',\n+    'housing-price': 'any',\n+    'housing-rooms': 'any',\n+    'housing-guests': 'any',\n+    'features': []\n+  };\n+\n+  function filterType(pin) {\n+    return filterValues['housing-type'] !== 'any' ? pin.offer.type === filterValues['housing-type'] : true;\n+  }\n+\n+  function filterRoom(pin) {\n+    return filterValues['housing-rooms'] !== 'any' ? pin.offer.rooms === (filterValues['housing-rooms'] * 1) : true;\n+  }\n+\n+  function filterGuest(pin) {\n+    return filterValues['housing-guests'] !== 'any' ? pin.offer.guests === (filterValues['housing-guests'] * 1) : true;","path":"js/filtering.js","position":21,"original_position":21,"commit_id":"aec7d1cacfc211204917bdaad754e8f269045e4a","original_commit_id":"aec7d1cacfc211204917bdaad754e8f269045e4a","user":{"login":"fyvfyv","id":3251438,"node_id":"MDQ6VXNlcjMyNTE0Mzg=","avatar_url":"https://avatars2.githubusercontent.com/u/3251438?v=4","gravatar_id":"","url":"https://api.github.com/users/fyvfyv","html_url":"https://github.com/fyvfyv","followers_url":"https://api.github.com/users/fyvfyv/followers","following_url":"https://api.github.com/users/fyvfyv/following{/other_user}","gists_url":"https://api.github.com/users/fyvfyv/gists{/gist_id}","starred_url":"https://api.github.com/users/fyvfyv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fyvfyv/subscriptions","organizations_url":"https://api.github.com/users/fyvfyv/orgs","repos_url":"https://api.github.com/users/fyvfyv/repos","events_url":"https://api.github.com/users/fyvfyv/events{/privacy}","received_events_url":"https://api.github.com/users/fyvfyv/received_events","type":"User","site_admin":false},"body":"Фильтруй на `any` заранее один раз, а не в каждой функции.","created_at":"2018-10-04T18:31:28Z","updated_at":"2018-10-04T18:34:45Z","html_url":"https://github.com/htmlacademy-javascript/243875-keksobooking/pull/8#discussion_r222781190","pull_request_url":"https://api.github.com/repos/htmlacademy-javascript/243875-keksobooking/pulls/8","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/htmlacademy-javascript/243875-keksobooking/pulls/comments/222781190"},"html":{"href":"https://github.com/htmlacademy-javascript/243875-keksobooking/pull/8#discussion_r222781190"},"pull_request":{"href":"https://api.github.com/repos/htmlacademy-javascript/243875-keksobooking/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/htmlacademy-javascript/243875-keksobooking/pulls/8","id":220246902,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIwMjQ2OTAy","html_url":"https://github.com/htmlacademy-javascript/243875-keksobooking/pull/8","diff_url":"https://github.com/htmlacademy-javascript/243875-keksobooking/pull/8.diff","patch_url":"https://github.com/htmlacademy-javascript/243875-keksobooking/pull/8.patch","issue_url":"https://api.github.com/repos/htmlacademy-javascript/243875-keksobooking/issues/8","number":8,"state":"open","locked":false,"title":"Личный проект: перламутровые пуговицы","user":{"login":"ArinaAnderson","id":30735724,"node_id":"MDQ6VXNlcjMwNzM1NzI0","avatar_url":"https://avatars1.githubusercontent.com/u/30735724?v=4","gravatar_id":"","url":"https://api.github.com/users/ArinaAnderson","html_url":"https://github.com/ArinaAnderson","followers_url":"https://api.github.com/users/ArinaAnderson/followers","following_url":"https://api.github.com/users/ArinaAnderson/following{/other_user}","gists_url":"https://api.github.com/users/ArinaAnderson/gists{/gist_id}","starred_url":"https://api.github.com/users/ArinaAnderson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArinaAnderson/subscriptions","organizations_url":"https://api.github.com/users/ArinaAnderson/orgs","repos_url":"https://api.github.com/users/ArinaAnderson/repos","events_url":"https://api.github.com/users/ArinaAnderson/events{/privacy}","received_events_url":"https://api.github.com/users/ArinaAnderson/received_events","type":"User","site_admin":false},"body":"\n\n---\n:mortar_board: [Личный проект: перламутровые пуговицы](https://up.htmlacademy.ru/javascript/15/user/243875/tasks/25)\n\n:boom: https://htmlacademy-javascript.github.io/243875-keksobooking/8/","created_at":"2018-10-04T04:32:33Z","updated_at":"2018-10-04T18:34:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f2db7a871f9e07ab4bc79f90010e8e0e31931aea","assignee":{"login":"fyvfyv","id":3251438,"node_id":"MDQ6VXNlcjMyNTE0Mzg=","avatar_url":"https://avatars2.githubusercontent.com/u/3251438?v=4","gravatar_id":"","url":"https://api.github.com/users/fyvfyv","html_url":"https://github.com/fyvfyv","followers_url":"https://api.github.com/users/fyvfyv/followers","following_url":"https://api.github.com/users/fyvfyv/following{/other_user}","gists_url":"https://api.github.com/users/fyvfyv/gists{/gist_id}","starred_url":"https://api.github.com/users/fyvfyv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fyvfyv/subscriptions","organizations_url":"https://api.github.com/users/fyvfyv/orgs","repos_url":"https://api.github.com/users/fyvfyv/repos","events_url":"https://api.github.com/users/fyvfyv/events{/privacy}","received_events_url":"https://api.github.com/users/fyvfyv/received_events","type":"User","site_admin":false},"assignees":[{"login":"fyvfyv","id":3251438,"node_id":"MDQ6VXNlcjMyNTE0Mzg=","avatar_url":"https://avatars2.githubusercontent.com/u/3251438?v=4","gravatar_id":"","url":"https://api.github.com/users/fyvfyv","html_url":"https://github.com/fyvfyv","followers_url":"https://api.github.com/users/fyvfyv/followers","following_url":"https://api.github.com/users/fyvfyv/following{/other_user}","gists_url":"https://api.github.com/users/fyvfyv/gists{/gist_id}","starred_url":"https://api.github.com/users/fyvfyv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fyvfyv/subscriptions","organizations_url":"https://api.github.com/users/fyvfyv/orgs","repos_url":"https://api.github.com/users/fyvfyv/repos","events_url":"https://api.github.com/users/fyvfyv/events{/privacy}","received_events_url":"https://api.github.com/users/fyvfyv/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/htmlacademy-javascript/243875-keksobooking/pulls/8/commits","review_comments_url":"https://api.github.com/repos/htmlacademy-javascript/243875-keksobooking/pulls/8/comments","review_comment_url":"https://api.github.com/repos/htmlacademy-javascript/243875-keksobooking/pulls/comments{/number}","comments_url":"https://api.github.com/repos/htmlacademy-javascript/243875-keksobooking/issues/8/comments","statuses_url":"https://api.github.com/repos/htmlacademy-javascript/243875-keksobooking/statuses/aec7d1cacfc211204917bdaad754e8f269045e4a","head":{"label":"ArinaAnderson:module7-task1","ref":"module7-task1","sha":"aec7d1cacfc211204917bdaad754e8f269045e4a","user":{"login":"ArinaAnderson","id":30735724,"node_id":"MDQ6VXNlcjMwNzM1NzI0","avatar_url":"https://avatars1.githubusercontent.com/u/30735724?v=4","gravatar_id":"","url":"https://api.github.com/users/ArinaAnderson","html_url":"https://github.com/ArinaAnderson","followers_url":"https://api.github.com/users/ArinaAnderson/followers","following_url":"https://api.github.com/users/ArinaAnderson/following{/other_user}","gists_url":"https://api.github.com/users/ArinaAnderson/gists{/gist_id}","starred_url":"https://api.github.com/users/ArinaAnderson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArinaAnderson/subscriptions","organizations_url":"https://api.github.com/users/ArinaAnderson/orgs","repos_url":"https://api.github.com/users/ArinaAnderson/repos","events_url":"https://api.github.com/users/ArinaAnderson/events{/privacy}","received_events_url":"https://api.github.com/users/ArinaAnderson/received_events","type":"User","site_admin":false},"repo":{"id":146518827,"node_id":"MDEwOlJlcG9zaXRvcnkxNDY1MTg4Mjc=","name":"243875-keksobooking","full_name":"ArinaAnderson/243875-keksobooking","private":false,"owner":{"login":"ArinaAnderson","id":30735724,"node_id":"MDQ6VXNlcjMwNzM1NzI0","avatar_url":"https://avatars1.githubusercontent.com/u/30735724?v=4","gravatar_id":"","url":"https://api.github.com/users/ArinaAnderson","html_url":"https://github.com/ArinaAnderson","followers_url":"https://api.github.com/users/ArinaAnderson/followers","following_url":"https://api.github.com/users/ArinaAnderson/following{/other_user}","gists_url":"https://api.github.com/users/ArinaAnderson/gists{/gist_id}","starred_url":"https://api.github.com/users/ArinaAnderson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArinaAnderson/subscriptions","organizations_url":"https://api.github.com/users/ArinaAnderson/orgs","repos_url":"https://api.github.com/users/ArinaAnderson/repos","events_url":"https://api.github.com/users/ArinaAnderson/events{/privacy}","received_events_url":"https://api.github.com/users/ArinaAnderson/received_events","type":"User","site_admin":false},"html_url":"https://github.com/ArinaAnderson/243875-keksobooking","description":"Марина Гандерсен","fork":true,"url":"https://api.github.com/repos/ArinaAnderson/243875-keksobooking","forks_url":"https://api.github.com/repos/ArinaAnderson/243875-keksobooking/forks","keys_url":"https://api.github.com/repos/ArinaAnderson/243875-keksobooking/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ArinaAnderson/243875-keksobooking/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ArinaAnderson/243875-keksobooking/teams","hooks_url":"https://api.github.com/repos/ArinaAnderson/243875-keksobooking/hooks","issue_events_url":"https://api.github.com/repos/ArinaAnderson/243875-keksobooking/issues/events{/number}","events_url":"https://api.github.com/repos/ArinaAnderson/243875-keksobooking/events","assignees_url":"https://api.github.com/repos/ArinaAnderson/243875-keksobooking/assignees{/user}","branches_url":"https://api.github.com/repos/ArinaAnderson/243875-keksobooking/branches{/branch}","tags_url":"https://api.github.com/repos/ArinaAnderson/243875-keksobooking/tags","blobs_url":"https://api.github.com/repos/ArinaAnderson/243875-keksobooking/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ArinaAnderson/243875-keksobooking/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ArinaAnderson/243875-keksobooking/git/refs{/sha}","trees_url":"https://api.github.com/repos/ArinaAnderson/243875-keksobooking/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ArinaAnderson/243875-keksobooking/statuses/{sha}","languages_url":"https://api.github.com/repos/ArinaAnderson/243875-keksobooking/languages","stargazers_url":"https://api.github.com/repos/ArinaAnderson/243875-keksobooking/stargazers","contributors_url":"https://api.github.com/repos/ArinaAnderson/243875-keksobooking/contributors","subscribers_url":"https://api.github.com/repos/ArinaAnderson/243875-keksobooking/subscribers","subscription_url":"https://api.github.com/repos/ArinaAnderson/243875-keksobooking/subscription","commits_url":"https://api.github.com/repos/ArinaAnderson/243875-keksobooking/commits{/sha}","git_commits_url":"https://api.github.com/repos/ArinaAnderson/243875-keksobooking/git/commits{/sha}","comments_url":"https://api.github.com/repos/ArinaAnderson/243875-keksobooking/comments{/number}","issue_comment_url":"https://api.github.com/repos/ArinaAnderson/243875-keksobooking/issues/comments{/number}","contents_url":"https://api.github.com/repos/ArinaAnderson/243875-keksobooking/contents/{+path}","compare_url":"https://api.github.com/repos/ArinaAnderson/243875-keksobooking/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ArinaAnderson/243875-keksobooking/merges","archive_url":"https://api.github.com/repos/ArinaAnderson/243875-keksobooking/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ArinaAnderson/243875-keksobooking/downloads","issues_url":"https://api.github.com/repos/ArinaAnderson/243875-keksobooking/issues{/number}","pulls_url":"https://api.github.com/repos/ArinaAnderson/243875-keksobooking/pulls{/number}","milestones_url":"https://api.github.com/repos/ArinaAnderson/243875-keksobooking/milestones{/number}","notifications_url":"https://api.github.com/repos/ArinaAnderson/243875-keksobooking/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ArinaAnderson/243875-keksobooking/labels{/name}","releases_url":"https://api.github.com/repos/ArinaAnderson/243875-keksobooking/releases{/id}","deployments_url":"https://api.github.com/repos/ArinaAnderson/243875-keksobooking/deployments","created_at":"2018-08-28T23:38:16Z","updated_at":"2018-10-04T04:06:15Z","pushed_at":"2018-10-04T04:28:33Z","git_url":"git://github.com/ArinaAnderson/243875-keksobooking.git","ssh_url":"git@github.com:ArinaAnderson/243875-keksobooking.git","clone_url":"https://github.com/ArinaAnderson/243875-keksobooking.git","svn_url":"https://github.com/ArinaAnderson/243875-keksobooking","homepage":null,"size":911,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":false,"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":"htmlacademy-javascript:master","ref":"master","sha":"4f079b4a283b81c0d1a3f1aba8234604fc7bb271","user":{"login":"htmlacademy-javascript","id":14179712,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MTc5NzEy","avatar_url":"https://avatars2.githubusercontent.com/u/14179712?v=4","gravatar_id":"","url":"https://api.github.com/users/htmlacademy-javascript","html_url":"https://github.com/htmlacademy-javascript","followers_url":"https://api.github.com/users/htmlacademy-javascript/followers","following_url":"https://api.github.com/users/htmlacademy-javascript/following{/other_user}","gists_url":"https://api.github.com/users/htmlacademy-javascript/gists{/gist_id}","starred_url":"https://api.github.com/users/htmlacademy-javascript/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/htmlacademy-javascript/subscriptions","organizations_url":"https://api.github.com/users/htmlacademy-javascript/orgs","repos_url":"https://api.github.com/users/htmlacademy-javascript/repos","events_url":"https://api.github.com/users/htmlacademy-javascript/events{/privacy}","received_events_url":"https://api.github.com/users/htmlacademy-javascript/received_events","type":"Organization","site_admin":false},"repo":{"id":146504088,"node_id":"MDEwOlJlcG9zaXRvcnkxNDY1MDQwODg=","name":"243875-keksobooking","full_name":"htmlacademy-javascript/243875-keksobooking","private":false,"owner":{"login":"htmlacademy-javascript","id":14179712,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MTc5NzEy","avatar_url":"https://avatars2.githubusercontent.com/u/14179712?v=4","gravatar_id":"","url":"https://api.github.com/users/htmlacademy-javascript","html_url":"https://github.com/htmlacademy-javascript","followers_url":"https://api.github.com/users/htmlacademy-javascript/followers","following_url":"https://api.github.com/users/htmlacademy-javascript/following{/other_user}","gists_url":"https://api.github.com/users/htmlacademy-javascript/gists{/gist_id}","starred_url":"https://api.github.com/users/htmlacademy-javascript/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/htmlacademy-javascript/subscriptions","organizations_url":"https://api.github.com/users/htmlacademy-javascript/orgs","repos_url":"https://api.github.com/users/htmlacademy-javascript/repos","events_url":"https://api.github.com/users/htmlacademy-javascript/events{/privacy}","received_events_url":"https://api.github.com/users/htmlacademy-javascript/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/htmlacademy-javascript/243875-keksobooking","description":"Марина Гандерсен","fork":false,"url":"https://api.github.com/repos/htmlacademy-javascript/243875-keksobooking","forks_url":"https://api.github.com/repos/htmlacademy-javascript/243875-keksobooking/forks","keys_url":"https://api.github.com/repos/htmlacademy-javascript/243875-keksobooking/keys{/key_id}","collaborators_url":"https://api.github.com/repos/htmlacademy-javascript/243875-keksobooking/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/htmlacademy-javascript/243875-keksobooking/teams","hooks_url":"https://api.github.com/repos/htmlacademy-javascript/243875-keksobooking/hooks","issue_events_url":"https://api.github.com/repos/htmlacademy-javascript/243875-keksobooking/issues/events{/number}","events_url":"https://api.github.com/repos/htmlacademy-javascript/243875-keksobooking/events","assignees_url":"https://api.github.com/repos/htmlacademy-javascript/243875-keksobooking/assignees{/user}","branches_url":"https://api.github.com/repos/htmlacademy-javascript/243875-keksobooking/branches{/branch}","tags_url":"https://api.github.com/repos/htmlacademy-javascript/243875-keksobooking/tags","blobs_url":"https://api.github.com/repos/htmlacademy-javascript/243875-keksobooking/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/htmlacademy-javascript/243875-keksobooking/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/htmlacademy-javascript/243875-keksobooking/git/refs{/sha}","trees_url":"https://api.github.com/repos/htmlacademy-javascript/243875-keksobooking/git/trees{/sha}","statuses_url":"https://api.github.com/repos/htmlacademy-javascript/243875-keksobooking/statuses/{sha}","languages_url":"https://api.github.com/repos/htmlacademy-javascript/243875-keksobooking/languages","stargazers_url":"https://api.github.com/repos/htmlacademy-javascript/243875-keksobooking/stargazers","contributors_url":"https://api.github.com/repos/htmlacademy-javascript/243875-keksobooking/contributors","subscribers_url":"https://api.github.com/repos/htmlacademy-javascript/243875-keksobooking/subscribers","subscription_url":"https://api.github.com/repos/htmlacademy-javascript/243875-keksobooking/subscription","commits_url":"https://api.github.com/repos/htmlacademy-javascript/243875-keksobooking/commits{/sha}","git_commits_url":"https://api.github.com/repos/htmlacademy-javascript/243875-keksobooking/git/commits{/sha}","comments_url":"https://api.github.com/repos/htmlacademy-javascript/243875-keksobooking/comments{/number}","issue_comment_url":"https://api.github.com/repos/htmlacademy-javascript/243875-keksobooking/issues/comments{/number}","contents_url":"https://api.github.com/repos/htmlacademy-javascript/243875-keksobooking/contents/{+path}","compare_url":"https://api.github.com/repos/htmlacademy-javascript/243875-keksobooking/compare/{base}...{head}","merges_url":"https://api.github.com/repos/htmlacademy-javascript/243875-keksobooking/merges","archive_url":"https://api.github.com/repos/htmlacademy-javascript/243875-keksobooking/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/htmlacademy-javascript/243875-keksobooking/downloads","issues_url":"https://api.github.com/repos/htmlacademy-javascript/243875-keksobooking/issues{/number}","pulls_url":"https://api.github.com/repos/htmlacademy-javascript/243875-keksobooking/pulls{/number}","milestones_url":"https://api.github.com/repos/htmlacademy-javascript/243875-keksobooking/milestones{/number}","notifications_url":"https://api.github.com/repos/htmlacademy-javascript/243875-keksobooking/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/htmlacademy-javascript/243875-keksobooking/labels{/name}","releases_url":"https://api.github.com/repos/htmlacademy-javascript/243875-keksobooking/releases{/id}","deployments_url":"https://api.github.com/repos/htmlacademy-javascript/243875-keksobooking/deployments","created_at":"2018-08-28T20:38:08Z","updated_at":"2018-09-29T22:07:43Z","pushed_at":"2018-10-04T04:34:10Z","git_url":"git://github.com/htmlacademy-javascript/243875-keksobooking.git","ssh_url":"git@github.com:htmlacademy-javascript/243875-keksobooking.git","clone_url":"https://github.com/htmlacademy-javascript/243875-keksobooking.git","svn_url":"https://github.com/htmlacademy-javascript/243875-keksobooking","homepage":"https://github.com/ArinaAnderson/243875-keksobooking","size":925,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":false,"has_projects":false,"has_downloads":false,"has_wiki":false,"has_pages":true,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/htmlacademy-javascript/243875-keksobooking/pulls/8"},"html":{"href":"https://github.com/htmlacademy-javascript/243875-keksobooking/pull/8"},"issue":{"href":"https://api.github.com/repos/htmlacademy-javascript/243875-keksobooking/issues/8"},"comments":{"href":"https://api.github.com/repos/htmlacademy-javascript/243875-keksobooking/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/htmlacademy-javascript/243875-keksobooking/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/htmlacademy-javascript/243875-keksobooking/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/htmlacademy-javascript/243875-keksobooking/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/htmlacademy-javascript/243875-keksobooking/statuses/aec7d1cacfc211204917bdaad754e8f269045e4a"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"fyvfyv"}}