{"action":"created","comment":{"url":"https://api.github.com/repos/urfu-2015/javascript-tasks-3/pulls/comments/42996004","id":42996004,"diff_hunk":"@@ -1,27 +1,111 @@\n 'use strict';\n \n-// Метод, который будет выполнять операции над коллекцией один за другим\n-module.exports.query = function (collection /* операторы через запятую */) {\n+module.exports.query = query;\n+module.exports.select = select;\n+module.exports.filterIn = filterIn;\n+module.exports.filterEqual = filterEqual;\n+module.exports.sortBy = sortBy;\n+module.exports.format = format;\n+module.exports.limit = limit;\n+module.exports.and = and;\n+module.exports.or = or;\n+module.exports.reverse = reverse;\n \n-};\n+function query(collection) {\n+    var myCollection = JSON.stringify(collection);\n+    myCollection = JSON.parse(myCollection);\n+    var args = [].slice.call(arguments, 1);\n+    args.unshift(myCollection);\n \n-// Оператор reverse, который переворачивает коллекцию\n-module.exports.reverse = function () {\n-    return function (collection) {\n-        var changedCollection = collection.reverse();\n+    myCollection = args.reduce(function (result, current) {\n+        return current(result);\n+    });\n+\n+    return myCollection;\n+}\n+\n+function select() {\n+    var attrNames = [].slice.call(arguments);\n+    return function(collection) {\n+        collection.forEach(function (item) {\n+            for (var prop in item) {","path":"lego.js","position":38,"original_position":38,"commit_id":"7aefa1051a0221ded25f060e4fe6c274d130a27b","original_commit_id":"7aefa1051a0221ded25f060e4fe6c274d130a27b","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":"Внутри `for in` нужно использовать [`hasOwnPropery`](http://shamansir.github.io/JavaScript-Garden/#object.forinloop)","created_at":"2015-10-26T14:02:15Z","updated_at":"2015-10-26T14:02:15Z","html_url":"https://github.com/urfu-2015/javascript-tasks-3/pull/66#discussion_r42996004","pull_request_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-3/pulls/66","_links":{"self":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-3/pulls/comments/42996004"},"html":{"href":"https://github.com/urfu-2015/javascript-tasks-3/pull/66#discussion_r42996004"},"pull_request":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-3/pulls/66"}}},"pull_request":{"url":"https://api.github.com/repos/urfu-2015/javascript-tasks-3/pulls/66","id":48660639,"html_url":"https://github.com/urfu-2015/javascript-tasks-3/pull/66","diff_url":"https://github.com/urfu-2015/javascript-tasks-3/pull/66.diff","patch_url":"https://github.com/urfu-2015/javascript-tasks-3/pull/66.patch","issue_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-3/issues/66","number":66,"state":"open","locked":false,"title":"Дудкевич Дмитрий","user":{"login":"DudaGod","id":5900697,"avatar_url":"https://avatars.githubusercontent.com/u/5900697?v=3","gravatar_id":"","url":"https://api.github.com/users/DudaGod","html_url":"https://github.com/DudaGod","followers_url":"https://api.github.com/users/DudaGod/followers","following_url":"https://api.github.com/users/DudaGod/following{/other_user}","gists_url":"https://api.github.com/users/DudaGod/gists{/gist_id}","starred_url":"https://api.github.com/users/DudaGod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DudaGod/subscriptions","organizations_url":"https://api.github.com/users/DudaGod/orgs","repos_url":"https://api.github.com/users/DudaGod/repos","events_url":"https://api.github.com/users/DudaGod/events{/privacy}","received_events_url":"https://api.github.com/users/DudaGod/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-10-24T17:18:29Z","updated_at":"2015-10-26T14:02:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"41150621c01b322b8c2633c83422a8bd1d44e869","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-3/pulls/66/commits","review_comments_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-3/pulls/66/comments","review_comment_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-3/pulls/comments{/number}","comments_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-3/issues/66/comments","statuses_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-3/statuses/7aefa1051a0221ded25f060e4fe6c274d130a27b","head":{"label":"DudaGod:master","ref":"master","sha":"7aefa1051a0221ded25f060e4fe6c274d130a27b","user":{"login":"DudaGod","id":5900697,"avatar_url":"https://avatars.githubusercontent.com/u/5900697?v=3","gravatar_id":"","url":"https://api.github.com/users/DudaGod","html_url":"https://github.com/DudaGod","followers_url":"https://api.github.com/users/DudaGod/followers","following_url":"https://api.github.com/users/DudaGod/following{/other_user}","gists_url":"https://api.github.com/users/DudaGod/gists{/gist_id}","starred_url":"https://api.github.com/users/DudaGod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DudaGod/subscriptions","organizations_url":"https://api.github.com/users/DudaGod/orgs","repos_url":"https://api.github.com/users/DudaGod/repos","events_url":"https://api.github.com/users/DudaGod/events{/privacy}","received_events_url":"https://api.github.com/users/DudaGod/received_events","type":"User","site_admin":false},"repo":{"id":44394082,"name":"javascript-tasks-3","full_name":"DudaGod/javascript-tasks-3","owner":{"login":"DudaGod","id":5900697,"avatar_url":"https://avatars.githubusercontent.com/u/5900697?v=3","gravatar_id":"","url":"https://api.github.com/users/DudaGod","html_url":"https://github.com/DudaGod","followers_url":"https://api.github.com/users/DudaGod/followers","following_url":"https://api.github.com/users/DudaGod/following{/other_user}","gists_url":"https://api.github.com/users/DudaGod/gists{/gist_id}","starred_url":"https://api.github.com/users/DudaGod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DudaGod/subscriptions","organizations_url":"https://api.github.com/users/DudaGod/orgs","repos_url":"https://api.github.com/users/DudaGod/repos","events_url":"https://api.github.com/users/DudaGod/events{/privacy}","received_events_url":"https://api.github.com/users/DudaGod/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/DudaGod/javascript-tasks-3","description":"Задача к лекции «Функции в Javascript» – «Картофельная вечеринка»","fork":true,"url":"https://api.github.com/repos/DudaGod/javascript-tasks-3","forks_url":"https://api.github.com/repos/DudaGod/javascript-tasks-3/forks","keys_url":"https://api.github.com/repos/DudaGod/javascript-tasks-3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DudaGod/javascript-tasks-3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DudaGod/javascript-tasks-3/teams","hooks_url":"https://api.github.com/repos/DudaGod/javascript-tasks-3/hooks","issue_events_url":"https://api.github.com/repos/DudaGod/javascript-tasks-3/issues/events{/number}","events_url":"https://api.github.com/repos/DudaGod/javascript-tasks-3/events","assignees_url":"https://api.github.com/repos/DudaGod/javascript-tasks-3/assignees{/user}","branches_url":"https://api.github.com/repos/DudaGod/javascript-tasks-3/branches{/branch}","tags_url":"https://api.github.com/repos/DudaGod/javascript-tasks-3/tags","blobs_url":"https://api.github.com/repos/DudaGod/javascript-tasks-3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DudaGod/javascript-tasks-3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DudaGod/javascript-tasks-3/git/refs{/sha}","trees_url":"https://api.github.com/repos/DudaGod/javascript-tasks-3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DudaGod/javascript-tasks-3/statuses/{sha}","languages_url":"https://api.github.com/repos/DudaGod/javascript-tasks-3/languages","stargazers_url":"https://api.github.com/repos/DudaGod/javascript-tasks-3/stargazers","contributors_url":"https://api.github.com/repos/DudaGod/javascript-tasks-3/contributors","subscribers_url":"https://api.github.com/repos/DudaGod/javascript-tasks-3/subscribers","subscription_url":"https://api.github.com/repos/DudaGod/javascript-tasks-3/subscription","commits_url":"https://api.github.com/repos/DudaGod/javascript-tasks-3/commits{/sha}","git_commits_url":"https://api.github.com/repos/DudaGod/javascript-tasks-3/git/commits{/sha}","comments_url":"https://api.github.com/repos/DudaGod/javascript-tasks-3/comments{/number}","issue_comment_url":"https://api.github.com/repos/DudaGod/javascript-tasks-3/issues/comments{/number}","contents_url":"https://api.github.com/repos/DudaGod/javascript-tasks-3/contents/{+path}","compare_url":"https://api.github.com/repos/DudaGod/javascript-tasks-3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DudaGod/javascript-tasks-3/merges","archive_url":"https://api.github.com/repos/DudaGod/javascript-tasks-3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DudaGod/javascript-tasks-3/downloads","issues_url":"https://api.github.com/repos/DudaGod/javascript-tasks-3/issues{/number}","pulls_url":"https://api.github.com/repos/DudaGod/javascript-tasks-3/pulls{/number}","milestones_url":"https://api.github.com/repos/DudaGod/javascript-tasks-3/milestones{/number}","notifications_url":"https://api.github.com/repos/DudaGod/javascript-tasks-3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DudaGod/javascript-tasks-3/labels{/name}","releases_url":"https://api.github.com/repos/DudaGod/javascript-tasks-3/releases{/id}","created_at":"2015-10-16T15:29:52Z","updated_at":"2015-10-16T15:29:53Z","pushed_at":"2015-10-24T18:28:00Z","git_url":"git://github.com/DudaGod/javascript-tasks-3.git","ssh_url":"git@github.com:DudaGod/javascript-tasks-3.git","clone_url":"https://github.com/DudaGod/javascript-tasks-3.git","svn_url":"https://github.com/DudaGod/javascript-tasks-3","homepage":"","size":65,"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":"758f14fb6b73fe2ea3682a3cb7794dab5259d0f0","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":44174808,"name":"javascript-tasks-3","full_name":"urfu-2015/javascript-tasks-3","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-3","description":"Задача к лекции «Функции в Javascript» – «Картофельная вечеринка»","fork":false,"url":"https://api.github.com/repos/urfu-2015/javascript-tasks-3","forks_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-3/forks","keys_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-3/teams","hooks_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-3/hooks","issue_events_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-3/issues/events{/number}","events_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-3/events","assignees_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-3/assignees{/user}","branches_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-3/branches{/branch}","tags_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-3/tags","blobs_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-3/git/refs{/sha}","trees_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-3/statuses/{sha}","languages_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-3/languages","stargazers_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-3/stargazers","contributors_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-3/contributors","subscribers_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-3/subscribers","subscription_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-3/subscription","commits_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-3/commits{/sha}","git_commits_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-3/git/commits{/sha}","comments_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-3/comments{/number}","issue_comment_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-3/issues/comments{/number}","contents_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-3/contents/{+path}","compare_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-3/merges","archive_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-3/downloads","issues_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-3/issues{/number}","pulls_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-3/pulls{/number}","milestones_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-3/milestones{/number}","notifications_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-3/labels{/name}","releases_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-3/releases{/id}","created_at":"2015-10-13T12:30:10Z","updated_at":"2015-10-24T17:16:36Z","pushed_at":"2015-10-26T12:08:01Z","git_url":"git://github.com/urfu-2015/javascript-tasks-3.git","ssh_url":"git@github.com:urfu-2015/javascript-tasks-3.git","clone_url":"https://github.com/urfu-2015/javascript-tasks-3.git","svn_url":"https://github.com/urfu-2015/javascript-tasks-3","homepage":"","size":1607,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":79,"mirror_url":null,"open_issues_count":42,"forks":79,"open_issues":42,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-3/pulls/66"},"html":{"href":"https://github.com/urfu-2015/javascript-tasks-3/pull/66"},"issue":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-3/issues/66"},"comments":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-3/issues/66/comments"},"review_comments":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-3/pulls/66/comments"},"review_comment":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-3/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-3/pulls/66/commits"},"statuses":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-3/statuses/7aefa1051a0221ded25f060e4fe6c274d130a27b"}}}}