{"action":"created","comment":{"url":"https://api.github.com/repos/urfu-2016/javascript-task-4/pulls/comments/86662397","pull_request_review_id":7312173,"id":86662397,"diff_hunk":"@@ -6,65 +6,133 @@\n  */\n exports.isStar = true;\n \n+var priority = {\n+    'and': 0,\n+    'or': 1,\n+    'filterIn': 2,\n+    'sortBy': 3,\n+    'select': 4,\n+    'limit': 5,\n+    'format': 6\n+};\n+\n+function sortMethods(methods) {\n+    return methods.sort(function (m1, m2) {\n+        return priority[m1.name] < priority[m2.name] ? -1 : 1;\n+    });\n+}\n+\n /**\n  * Запрос к коллекции\n  * @param {Array} collection\n  * @params {...Function} – Функции для запроса\n- * @returns {Array}\n+ * @returns {Array} - Функция, осуществляющая запрос\n  */\n exports.query = function (collection) {\n-    return collection;\n+    var copiedCollection = JSON.parse(JSON.stringify(collection));\n+\n+    var methods = [].slice.call(arguments, 1);\n+    var sortedMethods = sortMethods(methods);\n+\n+    sortedMethods.map(function (method) {\n+        copiedCollection = method(copiedCollection);\n+\n+        return undefined;\n+    });\n+\n+    return copiedCollection;\n };\n \n /**\n  * Выбор полей\n  * @params {...String}\n+ * @returns {Function} - Функция, выбирающая поля\n  */\n exports.select = function () {\n-    return;\n+    var args = [].slice.call(arguments);\n+\n+    var select = function (collection) {\n+        return collection.map(function (person) {\n+            var neddedPerson = {};","path":"lego.js","position":54,"original_position":54,"commit_id":"23d5f69f766f9e40a20a621d35d24fda8ac0a211","original_commit_id":"23d5f69f766f9e40a20a621d35d24fda8ac0a211","user":{"login":"Savichev-Igor","id":7279995,"avatar_url":"https://avatars.githubusercontent.com/u/7279995?v=3","gravatar_id":"","url":"https://api.github.com/users/Savichev-Igor","html_url":"https://github.com/Savichev-Igor","followers_url":"https://api.github.com/users/Savichev-Igor/followers","following_url":"https://api.github.com/users/Savichev-Igor/following{/other_user}","gists_url":"https://api.github.com/users/Savichev-Igor/gists{/gist_id}","starred_url":"https://api.github.com/users/Savichev-Igor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Savichev-Igor/subscriptions","organizations_url":"https://api.github.com/users/Savichev-Igor/orgs","repos_url":"https://api.github.com/users/Savichev-Igor/repos","events_url":"https://api.github.com/users/Savichev-Igor/events{/privacy}","received_events_url":"https://api.github.com/users/Savichev-Igor/received_events","type":"User","site_admin":false},"body":"Тут тоже с английским беда)","created_at":"2016-11-05T10:44:31Z","updated_at":"2016-11-05T10:44:31Z","html_url":"https://github.com/urfu-2016/javascript-task-4/pull/31#discussion_r86662397","pull_request_url":"https://api.github.com/repos/urfu-2016/javascript-task-4/pulls/31","_links":{"self":{"href":"https://api.github.com/repos/urfu-2016/javascript-task-4/pulls/comments/86662397"},"html":{"href":"https://github.com/urfu-2016/javascript-task-4/pull/31#discussion_r86662397"},"pull_request":{"href":"https://api.github.com/repos/urfu-2016/javascript-task-4/pulls/31"}}},"pull_request":{"url":"https://api.github.com/repos/urfu-2016/javascript-task-4/pulls/31","id":91835536,"html_url":"https://github.com/urfu-2016/javascript-task-4/pull/31","diff_url":"https://github.com/urfu-2016/javascript-task-4/pull/31.diff","patch_url":"https://github.com/urfu-2016/javascript-task-4/pull/31.patch","issue_url":"https://api.github.com/repos/urfu-2016/javascript-task-4/issues/31","number":31,"state":"open","locked":false,"title":"Смеловская Татьяна","user":{"login":"TatianaSmelovsckaya","id":22619719,"avatar_url":"https://avatars.githubusercontent.com/u/22619719?v=3","gravatar_id":"","url":"https://api.github.com/users/TatianaSmelovsckaya","html_url":"https://github.com/TatianaSmelovsckaya","followers_url":"https://api.github.com/users/TatianaSmelovsckaya/followers","following_url":"https://api.github.com/users/TatianaSmelovsckaya/following{/other_user}","gists_url":"https://api.github.com/users/TatianaSmelovsckaya/gists{/gist_id}","starred_url":"https://api.github.com/users/TatianaSmelovsckaya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TatianaSmelovsckaya/subscriptions","organizations_url":"https://api.github.com/users/TatianaSmelovsckaya/orgs","repos_url":"https://api.github.com/users/TatianaSmelovsckaya/repos","events_url":"https://api.github.com/users/TatianaSmelovsckaya/events{/privacy}","received_events_url":"https://api.github.com/users/TatianaSmelovsckaya/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-11-01T18:17:21Z","updated_at":"2016-11-05T10:44:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bc18b03fd0622157146e5c1e96d5330dae458f24","assignee":{"login":"Savichev-Igor","id":7279995,"avatar_url":"https://avatars.githubusercontent.com/u/7279995?v=3","gravatar_id":"","url":"https://api.github.com/users/Savichev-Igor","html_url":"https://github.com/Savichev-Igor","followers_url":"https://api.github.com/users/Savichev-Igor/followers","following_url":"https://api.github.com/users/Savichev-Igor/following{/other_user}","gists_url":"https://api.github.com/users/Savichev-Igor/gists{/gist_id}","starred_url":"https://api.github.com/users/Savichev-Igor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Savichev-Igor/subscriptions","organizations_url":"https://api.github.com/users/Savichev-Igor/orgs","repos_url":"https://api.github.com/users/Savichev-Igor/repos","events_url":"https://api.github.com/users/Savichev-Igor/events{/privacy}","received_events_url":"https://api.github.com/users/Savichev-Igor/received_events","type":"User","site_admin":false},"assignees":[{"login":"Savichev-Igor","id":7279995,"avatar_url":"https://avatars.githubusercontent.com/u/7279995?v=3","gravatar_id":"","url":"https://api.github.com/users/Savichev-Igor","html_url":"https://github.com/Savichev-Igor","followers_url":"https://api.github.com/users/Savichev-Igor/followers","following_url":"https://api.github.com/users/Savichev-Igor/following{/other_user}","gists_url":"https://api.github.com/users/Savichev-Igor/gists{/gist_id}","starred_url":"https://api.github.com/users/Savichev-Igor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Savichev-Igor/subscriptions","organizations_url":"https://api.github.com/users/Savichev-Igor/orgs","repos_url":"https://api.github.com/users/Savichev-Igor/repos","events_url":"https://api.github.com/users/Savichev-Igor/events{/privacy}","received_events_url":"https://api.github.com/users/Savichev-Igor/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/urfu-2016/javascript-task-4/pulls/31/commits","review_comments_url":"https://api.github.com/repos/urfu-2016/javascript-task-4/pulls/31/comments","review_comment_url":"https://api.github.com/repos/urfu-2016/javascript-task-4/pulls/comments{/number}","comments_url":"https://api.github.com/repos/urfu-2016/javascript-task-4/issues/31/comments","statuses_url":"https://api.github.com/repos/urfu-2016/javascript-task-4/statuses/23d5f69f766f9e40a20a621d35d24fda8ac0a211","head":{"label":"TatianaSmelovsckaya:master","ref":"master","sha":"23d5f69f766f9e40a20a621d35d24fda8ac0a211","user":{"login":"TatianaSmelovsckaya","id":22619719,"avatar_url":"https://avatars.githubusercontent.com/u/22619719?v=3","gravatar_id":"","url":"https://api.github.com/users/TatianaSmelovsckaya","html_url":"https://github.com/TatianaSmelovsckaya","followers_url":"https://api.github.com/users/TatianaSmelovsckaya/followers","following_url":"https://api.github.com/users/TatianaSmelovsckaya/following{/other_user}","gists_url":"https://api.github.com/users/TatianaSmelovsckaya/gists{/gist_id}","starred_url":"https://api.github.com/users/TatianaSmelovsckaya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TatianaSmelovsckaya/subscriptions","organizations_url":"https://api.github.com/users/TatianaSmelovsckaya/orgs","repos_url":"https://api.github.com/users/TatianaSmelovsckaya/repos","events_url":"https://api.github.com/users/TatianaSmelovsckaya/events{/privacy}","received_events_url":"https://api.github.com/users/TatianaSmelovsckaya/received_events","type":"User","site_admin":false},"repo":{"id":72551435,"name":"javascript-task-4","full_name":"TatianaSmelovsckaya/javascript-task-4","owner":{"login":"TatianaSmelovsckaya","id":22619719,"avatar_url":"https://avatars.githubusercontent.com/u/22619719?v=3","gravatar_id":"","url":"https://api.github.com/users/TatianaSmelovsckaya","html_url":"https://github.com/TatianaSmelovsckaya","followers_url":"https://api.github.com/users/TatianaSmelovsckaya/followers","following_url":"https://api.github.com/users/TatianaSmelovsckaya/following{/other_user}","gists_url":"https://api.github.com/users/TatianaSmelovsckaya/gists{/gist_id}","starred_url":"https://api.github.com/users/TatianaSmelovsckaya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TatianaSmelovsckaya/subscriptions","organizations_url":"https://api.github.com/users/TatianaSmelovsckaya/orgs","repos_url":"https://api.github.com/users/TatianaSmelovsckaya/repos","events_url":"https://api.github.com/users/TatianaSmelovsckaya/events{/privacy}","received_events_url":"https://api.github.com/users/TatianaSmelovsckaya/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/TatianaSmelovsckaya/javascript-task-4","description":"Задача «Картофельная вечеринка Билли»","fork":true,"url":"https://api.github.com/repos/TatianaSmelovsckaya/javascript-task-4","forks_url":"https://api.github.com/repos/TatianaSmelovsckaya/javascript-task-4/forks","keys_url":"https://api.github.com/repos/TatianaSmelovsckaya/javascript-task-4/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TatianaSmelovsckaya/javascript-task-4/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TatianaSmelovsckaya/javascript-task-4/teams","hooks_url":"https://api.github.com/repos/TatianaSmelovsckaya/javascript-task-4/hooks","issue_events_url":"https://api.github.com/repos/TatianaSmelovsckaya/javascript-task-4/issues/events{/number}","events_url":"https://api.github.com/repos/TatianaSmelovsckaya/javascript-task-4/events","assignees_url":"https://api.github.com/repos/TatianaSmelovsckaya/javascript-task-4/assignees{/user}","branches_url":"https://api.github.com/repos/TatianaSmelovsckaya/javascript-task-4/branches{/branch}","tags_url":"https://api.github.com/repos/TatianaSmelovsckaya/javascript-task-4/tags","blobs_url":"https://api.github.com/repos/TatianaSmelovsckaya/javascript-task-4/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TatianaSmelovsckaya/javascript-task-4/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TatianaSmelovsckaya/javascript-task-4/git/refs{/sha}","trees_url":"https://api.github.com/repos/TatianaSmelovsckaya/javascript-task-4/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TatianaSmelovsckaya/javascript-task-4/statuses/{sha}","languages_url":"https://api.github.com/repos/TatianaSmelovsckaya/javascript-task-4/languages","stargazers_url":"https://api.github.com/repos/TatianaSmelovsckaya/javascript-task-4/stargazers","contributors_url":"https://api.github.com/repos/TatianaSmelovsckaya/javascript-task-4/contributors","subscribers_url":"https://api.github.com/repos/TatianaSmelovsckaya/javascript-task-4/subscribers","subscription_url":"https://api.github.com/repos/TatianaSmelovsckaya/javascript-task-4/subscription","commits_url":"https://api.github.com/repos/TatianaSmelovsckaya/javascript-task-4/commits{/sha}","git_commits_url":"https://api.github.com/repos/TatianaSmelovsckaya/javascript-task-4/git/commits{/sha}","comments_url":"https://api.github.com/repos/TatianaSmelovsckaya/javascript-task-4/comments{/number}","issue_comment_url":"https://api.github.com/repos/TatianaSmelovsckaya/javascript-task-4/issues/comments{/number}","contents_url":"https://api.github.com/repos/TatianaSmelovsckaya/javascript-task-4/contents/{+path}","compare_url":"https://api.github.com/repos/TatianaSmelovsckaya/javascript-task-4/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TatianaSmelovsckaya/javascript-task-4/merges","archive_url":"https://api.github.com/repos/TatianaSmelovsckaya/javascript-task-4/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TatianaSmelovsckaya/javascript-task-4/downloads","issues_url":"https://api.github.com/repos/TatianaSmelovsckaya/javascript-task-4/issues{/number}","pulls_url":"https://api.github.com/repos/TatianaSmelovsckaya/javascript-task-4/pulls{/number}","milestones_url":"https://api.github.com/repos/TatianaSmelovsckaya/javascript-task-4/milestones{/number}","notifications_url":"https://api.github.com/repos/TatianaSmelovsckaya/javascript-task-4/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TatianaSmelovsckaya/javascript-task-4/labels{/name}","releases_url":"https://api.github.com/repos/TatianaSmelovsckaya/javascript-task-4/releases{/id}","deployments_url":"https://api.github.com/repos/TatianaSmelovsckaya/javascript-task-4/deployments","created_at":"2016-11-01T15:50:13Z","updated_at":"2016-11-01T15:50:14Z","pushed_at":"2016-11-05T08:55:12Z","git_url":"git://github.com/TatianaSmelovsckaya/javascript-task-4.git","ssh_url":"git@github.com:TatianaSmelovsckaya/javascript-task-4.git","clone_url":"https://github.com/TatianaSmelovsckaya/javascript-task-4.git","svn_url":"https://github.com/TatianaSmelovsckaya/javascript-task-4","homepage":"","size":8,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"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-2016:master","ref":"master","sha":"7478a115049e4e20247defea7e2f8dc6f49a8239","user":{"login":"urfu-2016","id":22170529,"avatar_url":"https://avatars.githubusercontent.com/u/22170529?v=3","gravatar_id":"","url":"https://api.github.com/users/urfu-2016","html_url":"https://github.com/urfu-2016","followers_url":"https://api.github.com/users/urfu-2016/followers","following_url":"https://api.github.com/users/urfu-2016/following{/other_user}","gists_url":"https://api.github.com/users/urfu-2016/gists{/gist_id}","starred_url":"https://api.github.com/users/urfu-2016/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/urfu-2016/subscriptions","organizations_url":"https://api.github.com/users/urfu-2016/orgs","repos_url":"https://api.github.com/users/urfu-2016/repos","events_url":"https://api.github.com/users/urfu-2016/events{/privacy}","received_events_url":"https://api.github.com/users/urfu-2016/received_events","type":"Organization","site_admin":false},"repo":{"id":71762351,"name":"javascript-task-4","full_name":"urfu-2016/javascript-task-4","owner":{"login":"urfu-2016","id":22170529,"avatar_url":"https://avatars.githubusercontent.com/u/22170529?v=3","gravatar_id":"","url":"https://api.github.com/users/urfu-2016","html_url":"https://github.com/urfu-2016","followers_url":"https://api.github.com/users/urfu-2016/followers","following_url":"https://api.github.com/users/urfu-2016/following{/other_user}","gists_url":"https://api.github.com/users/urfu-2016/gists{/gist_id}","starred_url":"https://api.github.com/users/urfu-2016/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/urfu-2016/subscriptions","organizations_url":"https://api.github.com/users/urfu-2016/orgs","repos_url":"https://api.github.com/users/urfu-2016/repos","events_url":"https://api.github.com/users/urfu-2016/events{/privacy}","received_events_url":"https://api.github.com/users/urfu-2016/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/urfu-2016/javascript-task-4","description":"Задача «Картофельная вечеринка Билли»","fork":false,"url":"https://api.github.com/repos/urfu-2016/javascript-task-4","forks_url":"https://api.github.com/repos/urfu-2016/javascript-task-4/forks","keys_url":"https://api.github.com/repos/urfu-2016/javascript-task-4/keys{/key_id}","collaborators_url":"https://api.github.com/repos/urfu-2016/javascript-task-4/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/urfu-2016/javascript-task-4/teams","hooks_url":"https://api.github.com/repos/urfu-2016/javascript-task-4/hooks","issue_events_url":"https://api.github.com/repos/urfu-2016/javascript-task-4/issues/events{/number}","events_url":"https://api.github.com/repos/urfu-2016/javascript-task-4/events","assignees_url":"https://api.github.com/repos/urfu-2016/javascript-task-4/assignees{/user}","branches_url":"https://api.github.com/repos/urfu-2016/javascript-task-4/branches{/branch}","tags_url":"https://api.github.com/repos/urfu-2016/javascript-task-4/tags","blobs_url":"https://api.github.com/repos/urfu-2016/javascript-task-4/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/urfu-2016/javascript-task-4/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/urfu-2016/javascript-task-4/git/refs{/sha}","trees_url":"https://api.github.com/repos/urfu-2016/javascript-task-4/git/trees{/sha}","statuses_url":"https://api.github.com/repos/urfu-2016/javascript-task-4/statuses/{sha}","languages_url":"https://api.github.com/repos/urfu-2016/javascript-task-4/languages","stargazers_url":"https://api.github.com/repos/urfu-2016/javascript-task-4/stargazers","contributors_url":"https://api.github.com/repos/urfu-2016/javascript-task-4/contributors","subscribers_url":"https://api.github.com/repos/urfu-2016/javascript-task-4/subscribers","subscription_url":"https://api.github.com/repos/urfu-2016/javascript-task-4/subscription","commits_url":"https://api.github.com/repos/urfu-2016/javascript-task-4/commits{/sha}","git_commits_url":"https://api.github.com/repos/urfu-2016/javascript-task-4/git/commits{/sha}","comments_url":"https://api.github.com/repos/urfu-2016/javascript-task-4/comments{/number}","issue_comment_url":"https://api.github.com/repos/urfu-2016/javascript-task-4/issues/comments{/number}","contents_url":"https://api.github.com/repos/urfu-2016/javascript-task-4/contents/{+path}","compare_url":"https://api.github.com/repos/urfu-2016/javascript-task-4/compare/{base}...{head}","merges_url":"https://api.github.com/repos/urfu-2016/javascript-task-4/merges","archive_url":"https://api.github.com/repos/urfu-2016/javascript-task-4/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/urfu-2016/javascript-task-4/downloads","issues_url":"https://api.github.com/repos/urfu-2016/javascript-task-4/issues{/number}","pulls_url":"https://api.github.com/repos/urfu-2016/javascript-task-4/pulls{/number}","milestones_url":"https://api.github.com/repos/urfu-2016/javascript-task-4/milestones{/number}","notifications_url":"https://api.github.com/repos/urfu-2016/javascript-task-4/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/urfu-2016/javascript-task-4/labels{/name}","releases_url":"https://api.github.com/repos/urfu-2016/javascript-task-4/releases{/id}","deployments_url":"https://api.github.com/repos/urfu-2016/javascript-task-4/deployments","created_at":"2016-10-24T07:19:05Z","updated_at":"2016-10-27T17:04:42Z","pushed_at":"2016-11-05T10:31:35Z","git_url":"git://github.com/urfu-2016/javascript-task-4.git","ssh_url":"git@github.com:urfu-2016/javascript-task-4.git","clone_url":"https://github.com/urfu-2016/javascript-task-4.git","svn_url":"https://github.com/urfu-2016/javascript-task-4","homepage":"","size":13,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":80,"mirror_url":null,"open_issues_count":57,"forks":80,"open_issues":57,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/urfu-2016/javascript-task-4/pulls/31"},"html":{"href":"https://github.com/urfu-2016/javascript-task-4/pull/31"},"issue":{"href":"https://api.github.com/repos/urfu-2016/javascript-task-4/issues/31"},"comments":{"href":"https://api.github.com/repos/urfu-2016/javascript-task-4/issues/31/comments"},"review_comments":{"href":"https://api.github.com/repos/urfu-2016/javascript-task-4/pulls/31/comments"},"review_comment":{"href":"https://api.github.com/repos/urfu-2016/javascript-task-4/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/urfu-2016/javascript-task-4/pulls/31/commits"},"statuses":{"href":"https://api.github.com/repos/urfu-2016/javascript-task-4/statuses/23d5f69f766f9e40a20a621d35d24fda8ac0a211"}}}}
{"actor":{"display_login":"Savichev-Igor"}}