{"action":"created","comment":{"url":"https://api.github.com/repos/urfu-2015/javascript-tasks-7/pulls/comments/46754719","id":46754719,"diff_hunk":"@@ -2,4 +2,110 @@\n \n exports.init = function () {\n \n+    Object.prototype.checkContainsKeys = function (keys) {\n+        if (typeof this === 'object') {\n+            for (var i = 0; i < keys.length; i++) {\n+                if (!this.hasOwnProperty(keys[i])) {\n+                    return false;\n+                }\n+            }\n+            return true;\n+        } else {\n+            throw new Error('unvalid type');\n+        }\n+    };\n+    Object.prototype.checkHasKeys = function (keys) {\n+        if (typeof this === 'object') {\n+            var clKeys = keys.concat();\n+            for (var key in this) {\n+                if (this.hasOwnProperty(key)) {\n+                    var i = clKeys.indexOf(key);\n+                    if (i < 0) {\n+                        return false;\n+                    } else {\n+                        clKeys.splice(i, 1);\n+                    }\n+                }\n+            }\n+            return clKeys.length === 0;\n+        } else {\n+            throw new Error('unvalid type');\n+        }\n+    };\n+    Object.prototype.checkContainsValues = function (values) {\n+        if (typeof this === 'object') {\n+            var stat = false;\n+            for (var i = 0; i < values.length; i++) {\n+                stat = false;\n+                var value = values[i];\n+                for (var key in this) {\n+                    if (this.hasOwnProperty(key) && this[key] === value) {\n+                        stat = true;\n+                        break;\n+                    }\n+                }\n+                if (!stat) {\n+                    return false;\n+                }\n+            }\n+            return stat;\n+        } else {\n+            throw new Error('unvalid type');\n+        }\n+    };\n+    Object.prototype.checkHasValues = function (values) {\n+        if (typeof this === 'object') {\n+            var clValues = values.concat();\n+            for (var key in this) {\n+                if (this.hasOwnProperty(key)) {\n+                    if (clValues.indexOf(this[key]) >= 0) {\n+                        clValues.splice(clValues.indexOf(this[key]), 1);\n+                    } else {\n+                        return false;\n+                    }\n+                }\n+            }\n+            return clValues.length === 0;\n+        } else {\n+            throw new Error('unvalid type');\n+        }\n+    };\n+    Object.prototype.checkHasValueType = function (key, type) {\n+        if (typeof this === 'object') {\n+            if (this.hasOwnProperty(key)) {\n+                var strType =\n+                String(type).split(' ')[1].substr(0, String(type)\n+                .split(' ')[1].length - 2).toLowerCase();\n+                if (strType === 'array') {\n+                    return this[key] instanceof Array;\n+                } else {\n+                    return typeof this[key] === strType;\n+                }\n+            }\n+            return 'У объекта нет такого свойства';\n+        } else {\n+            throw new Error('unvalid type');\n+        }\n+    };\n+    Object.prototype.checkHasLength = function (length) {\n+        if (typeof this === 'object' || typeof this === 'string') {","path":"src/check.js","position":90,"original_position":90,"commit_id":"b68da5e37b2ca3a7abbfe4a63eaa2738f3869752","original_commit_id":"b68da5e37b2ca3a7abbfe4a63eaa2738f3869752","user":{"login":"Zhigalov","id":1654243,"avatar_url":"https://avatars.githubusercontent.com/u/1654243?v=3","gravatar_id":"","url":"https://api.github.com/users/Zhigalov","html_url":"https://github.com/Zhigalov","followers_url":"https://api.github.com/users/Zhigalov/followers","following_url":"https://api.github.com/users/Zhigalov/following{/other_user}","gists_url":"https://api.github.com/users/Zhigalov/gists{/gist_id}","starred_url":"https://api.github.com/users/Zhigalov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zhigalov/subscriptions","organizations_url":"https://api.github.com/users/Zhigalov/orgs","repos_url":"https://api.github.com/users/Zhigalov/repos","events_url":"https://api.github.com/users/Zhigalov/events{/privacy}","received_events_url":"https://api.github.com/users/Zhigalov/received_events","type":"User","site_admin":false},"body":"`Определён для массивов и строк. `","created_at":"2015-12-05T06:10:08Z","updated_at":"2015-12-05T06:10:08Z","html_url":"https://github.com/urfu-2015/javascript-tasks-7/pull/46#discussion_r46754719","pull_request_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-7/pulls/46","_links":{"self":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-7/pulls/comments/46754719"},"html":{"href":"https://github.com/urfu-2015/javascript-tasks-7/pull/46#discussion_r46754719"},"pull_request":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-7/pulls/46"}}},"pull_request":{"url":"https://api.github.com/repos/urfu-2015/javascript-tasks-7/pulls/46","id":51556119,"html_url":"https://github.com/urfu-2015/javascript-tasks-7/pull/46","diff_url":"https://github.com/urfu-2015/javascript-tasks-7/pull/46.diff","patch_url":"https://github.com/urfu-2015/javascript-tasks-7/pull/46.patch","issue_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-7/issues/46","number":46,"state":"open","locked":false,"title":"Davletova Aliya","user":{"login":"davletova","id":14953951,"avatar_url":"https://avatars.githubusercontent.com/u/14953951?v=3","gravatar_id":"","url":"https://api.github.com/users/davletova","html_url":"https://github.com/davletova","followers_url":"https://api.github.com/users/davletova/followers","following_url":"https://api.github.com/users/davletova/following{/other_user}","gists_url":"https://api.github.com/users/davletova/gists{/gist_id}","starred_url":"https://api.github.com/users/davletova/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davletova/subscriptions","organizations_url":"https://api.github.com/users/davletova/orgs","repos_url":"https://api.github.com/users/davletova/repos","events_url":"https://api.github.com/users/davletova/events{/privacy}","received_events_url":"https://api.github.com/users/davletova/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-11-23T17:47:25Z","updated_at":"2015-12-05T06:10:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4059359436260b5854fe67ee0ea264fe35433ee8","assignee":{"login":"Zhigalov","id":1654243,"avatar_url":"https://avatars.githubusercontent.com/u/1654243?v=3","gravatar_id":"","url":"https://api.github.com/users/Zhigalov","html_url":"https://github.com/Zhigalov","followers_url":"https://api.github.com/users/Zhigalov/followers","following_url":"https://api.github.com/users/Zhigalov/following{/other_user}","gists_url":"https://api.github.com/users/Zhigalov/gists{/gist_id}","starred_url":"https://api.github.com/users/Zhigalov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zhigalov/subscriptions","organizations_url":"https://api.github.com/users/Zhigalov/orgs","repos_url":"https://api.github.com/users/Zhigalov/repos","events_url":"https://api.github.com/users/Zhigalov/events{/privacy}","received_events_url":"https://api.github.com/users/Zhigalov/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-7/pulls/46/commits","review_comments_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-7/pulls/46/comments","review_comment_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-7/pulls/comments{/number}","comments_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-7/issues/46/comments","statuses_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-7/statuses/b68da5e37b2ca3a7abbfe4a63eaa2738f3869752","head":{"label":"davletova:master","ref":"master","sha":"b68da5e37b2ca3a7abbfe4a63eaa2738f3869752","user":{"login":"davletova","id":14953951,"avatar_url":"https://avatars.githubusercontent.com/u/14953951?v=3","gravatar_id":"","url":"https://api.github.com/users/davletova","html_url":"https://github.com/davletova","followers_url":"https://api.github.com/users/davletova/followers","following_url":"https://api.github.com/users/davletova/following{/other_user}","gists_url":"https://api.github.com/users/davletova/gists{/gist_id}","starred_url":"https://api.github.com/users/davletova/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davletova/subscriptions","organizations_url":"https://api.github.com/users/davletova/orgs","repos_url":"https://api.github.com/users/davletova/repos","events_url":"https://api.github.com/users/davletova/events{/privacy}","received_events_url":"https://api.github.com/users/davletova/received_events","type":"User","site_admin":false},"repo":{"id":46737434,"name":"javascript-tasks-7","full_name":"davletova/javascript-tasks-7","owner":{"login":"davletova","id":14953951,"avatar_url":"https://avatars.githubusercontent.com/u/14953951?v=3","gravatar_id":"","url":"https://api.github.com/users/davletova","html_url":"https://github.com/davletova","followers_url":"https://api.github.com/users/davletova/followers","following_url":"https://api.github.com/users/davletova/following{/other_user}","gists_url":"https://api.github.com/users/davletova/gists{/gist_id}","starred_url":"https://api.github.com/users/davletova/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davletova/subscriptions","organizations_url":"https://api.github.com/users/davletova/orgs","repos_url":"https://api.github.com/users/davletova/repos","events_url":"https://api.github.com/users/davletova/events{/privacy}","received_events_url":"https://api.github.com/users/davletova/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/davletova/javascript-tasks-7","description":"Задача к лекции «Прототипы»","fork":true,"url":"https://api.github.com/repos/davletova/javascript-tasks-7","forks_url":"https://api.github.com/repos/davletova/javascript-tasks-7/forks","keys_url":"https://api.github.com/repos/davletova/javascript-tasks-7/keys{/key_id}","collaborators_url":"https://api.github.com/repos/davletova/javascript-tasks-7/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/davletova/javascript-tasks-7/teams","hooks_url":"https://api.github.com/repos/davletova/javascript-tasks-7/hooks","issue_events_url":"https://api.github.com/repos/davletova/javascript-tasks-7/issues/events{/number}","events_url":"https://api.github.com/repos/davletova/javascript-tasks-7/events","assignees_url":"https://api.github.com/repos/davletova/javascript-tasks-7/assignees{/user}","branches_url":"https://api.github.com/repos/davletova/javascript-tasks-7/branches{/branch}","tags_url":"https://api.github.com/repos/davletova/javascript-tasks-7/tags","blobs_url":"https://api.github.com/repos/davletova/javascript-tasks-7/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/davletova/javascript-tasks-7/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/davletova/javascript-tasks-7/git/refs{/sha}","trees_url":"https://api.github.com/repos/davletova/javascript-tasks-7/git/trees{/sha}","statuses_url":"https://api.github.com/repos/davletova/javascript-tasks-7/statuses/{sha}","languages_url":"https://api.github.com/repos/davletova/javascript-tasks-7/languages","stargazers_url":"https://api.github.com/repos/davletova/javascript-tasks-7/stargazers","contributors_url":"https://api.github.com/repos/davletova/javascript-tasks-7/contributors","subscribers_url":"https://api.github.com/repos/davletova/javascript-tasks-7/subscribers","subscription_url":"https://api.github.com/repos/davletova/javascript-tasks-7/subscription","commits_url":"https://api.github.com/repos/davletova/javascript-tasks-7/commits{/sha}","git_commits_url":"https://api.github.com/repos/davletova/javascript-tasks-7/git/commits{/sha}","comments_url":"https://api.github.com/repos/davletova/javascript-tasks-7/comments{/number}","issue_comment_url":"https://api.github.com/repos/davletova/javascript-tasks-7/issues/comments{/number}","contents_url":"https://api.github.com/repos/davletova/javascript-tasks-7/contents/{+path}","compare_url":"https://api.github.com/repos/davletova/javascript-tasks-7/compare/{base}...{head}","merges_url":"https://api.github.com/repos/davletova/javascript-tasks-7/merges","archive_url":"https://api.github.com/repos/davletova/javascript-tasks-7/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/davletova/javascript-tasks-7/downloads","issues_url":"https://api.github.com/repos/davletova/javascript-tasks-7/issues{/number}","pulls_url":"https://api.github.com/repos/davletova/javascript-tasks-7/pulls{/number}","milestones_url":"https://api.github.com/repos/davletova/javascript-tasks-7/milestones{/number}","notifications_url":"https://api.github.com/repos/davletova/javascript-tasks-7/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/davletova/javascript-tasks-7/labels{/name}","releases_url":"https://api.github.com/repos/davletova/javascript-tasks-7/releases{/id}","created_at":"2015-11-23T17:42:30Z","updated_at":"2015-11-23T17:42:31Z","pushed_at":"2015-12-04T14:43:53Z","git_url":"git://github.com/davletova/javascript-tasks-7.git","ssh_url":"git@github.com:davletova/javascript-tasks-7.git","clone_url":"https://github.com/davletova/javascript-tasks-7.git","svn_url":"https://github.com/davletova/javascript-tasks-7","homepage":"","size":12,"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":"fc0b1e2ad14a21f600f4ee446dff7717716aa059","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":45921264,"name":"javascript-tasks-7","full_name":"urfu-2015/javascript-tasks-7","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-7","description":"Задача к лекции «Прототипы»","fork":false,"url":"https://api.github.com/repos/urfu-2015/javascript-tasks-7","forks_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-7/forks","keys_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-7/keys{/key_id}","collaborators_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-7/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-7/teams","hooks_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-7/hooks","issue_events_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-7/issues/events{/number}","events_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-7/events","assignees_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-7/assignees{/user}","branches_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-7/branches{/branch}","tags_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-7/tags","blobs_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-7/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-7/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-7/git/refs{/sha}","trees_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-7/git/trees{/sha}","statuses_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-7/statuses/{sha}","languages_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-7/languages","stargazers_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-7/stargazers","contributors_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-7/contributors","subscribers_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-7/subscribers","subscription_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-7/subscription","commits_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-7/commits{/sha}","git_commits_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-7/git/commits{/sha}","comments_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-7/comments{/number}","issue_comment_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-7/issues/comments{/number}","contents_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-7/contents/{+path}","compare_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-7/compare/{base}...{head}","merges_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-7/merges","archive_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-7/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-7/downloads","issues_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-7/issues{/number}","pulls_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-7/pulls{/number}","milestones_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-7/milestones{/number}","notifications_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-7/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-7/labels{/name}","releases_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-7/releases{/id}","created_at":"2015-11-10T15:32:46Z","updated_at":"2015-11-10T15:50:17Z","pushed_at":"2015-12-04T22:17:47Z","git_url":"git://github.com/urfu-2015/javascript-tasks-7.git","ssh_url":"git@github.com:urfu-2015/javascript-tasks-7.git","clone_url":"https://github.com/urfu-2015/javascript-tasks-7.git","svn_url":"https://github.com/urfu-2015/javascript-tasks-7","homepage":"","size":0,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":47,"mirror_url":null,"open_issues_count":8,"forks":47,"open_issues":8,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-7/pulls/46"},"html":{"href":"https://github.com/urfu-2015/javascript-tasks-7/pull/46"},"issue":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-7/issues/46"},"comments":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-7/issues/46/comments"},"review_comments":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-7/pulls/46/comments"},"review_comment":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-7/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-7/pulls/46/commits"},"statuses":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-7/statuses/b68da5e37b2ca3a7abbfe4a63eaa2738f3869752"}}}}