{"action":"created","comment":{"url":"https://api.github.com/repos/cognits/frontend-udacity-javascript/pulls/comments/25958417","id":25958417,"diff_hunk":"@@ -0,0 +1,147 @@\n+// Iterate through the localizedRuleNames in ruleResults and \n+// return an array of their strings.\n+function ruleList(results) {\n+ \n+  var ruleResults = results.formattedResults.ruleResults;\n+  var localizedRuleNamesArray = [];\n+ \n+  for (var key in ruleResults) {\n+ \n+    // Iterate through object's own properties only\n+    if ( ruleResults.hasOwnProperty(key) ) {\n+      localizedRuleNamesArray.push( ruleResults[key].localizedRuleName );\n+    }\n+  }\n+ \n+  return localizedRuleNamesArray;\n+}\n+ \n+// Iterate through pageStats in the psiResults object and \n+// return the total number of bytes to load the website.\n+function totalBytes(results) {\n+ \n+  var pageStats = results.pageStats;\n+  var totalBytesSum = 0;\n+ \n+  for (var key in pageStats) {\n+ \n+    // Iterate through object's own properties only\n+    // and if they contain 'Bytes' in their title\n+ \n+    if ( pageStats.hasOwnProperty(key) && keyContainsString(key, 'Bytes') ) {\n+      totalBytesSum += +pageStats[key];\n+    }\n+  }\n+ \n+  return totalBytesSum;\n+}\n+ \n+var keyContainsString = function(key, string) {\n+  return key.indexOf(string) > -1;\n+};\n+ \n+// Below, you'll find a sample PS Insights JSON\n+// and two console.log statements to help you test your code!\n+ ","path":"PagesSpeed/script.js","position":45,"original_position":45,"commit_id":"b4e15a14b2776aed2e0210389ce0cda63519d44b","original_commit_id":"b4e15a14b2776aed2e0210389ce0cda63519d44b","user":{"login":"MRodriguezz","id":9449775,"avatar_url":"https://avatars.githubusercontent.com/u/9449775?v=3","gravatar_id":"","url":"https://api.github.com/users/MRodriguezz","html_url":"https://github.com/MRodriguezz","followers_url":"https://api.github.com/users/MRodriguezz/followers","following_url":"https://api.github.com/users/MRodriguezz/following{/other_user}","gists_url":"https://api.github.com/users/MRodriguezz/gists{/gist_id}","starred_url":"https://api.github.com/users/MRodriguezz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MRodriguezz/subscriptions","organizations_url":"https://api.github.com/users/MRodriguezz/orgs","repos_url":"https://api.github.com/users/MRodriguezz/repos","events_url":"https://api.github.com/users/MRodriguezz/events{/privacy}","received_events_url":"https://api.github.com/users/MRodriguezz/received_events","type":"User","site_admin":false},"body":"Aca en esta parte seria bueno que los datos que declaraste de tu JSon sean en un archivo aparte, para poder asi reducir un poco el codigo, es una suguerencia para que lo podas implementar :).\r\n","created_at":"2015-03-06T16:53:31Z","updated_at":"2015-03-06T16:53:31Z","html_url":"https://github.com/cognits/frontend-udacity-javascript/pull/4#discussion_r25958417","pull_request_url":"https://api.github.com/repos/cognits/frontend-udacity-javascript/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/cognits/frontend-udacity-javascript/pulls/comments/25958417"},"html":{"href":"https://github.com/cognits/frontend-udacity-javascript/pull/4#discussion_r25958417"},"pull_request":{"href":"https://api.github.com/repos/cognits/frontend-udacity-javascript/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/cognits/frontend-udacity-javascript/pulls/4","id":30653103,"html_url":"https://github.com/cognits/frontend-udacity-javascript/pull/4","diff_url":"https://github.com/cognits/frontend-udacity-javascript/pull/4.diff","patch_url":"https://github.com/cognits/frontend-udacity-javascript/pull/4.patch","issue_url":"https://api.github.com/repos/cognits/frontend-udacity-javascript/issues/4","number":4,"state":"open","locked":false,"title":"archivos de udacity project ","user":{"login":"alfpain","id":9449743,"avatar_url":"https://avatars.githubusercontent.com/u/9449743?v=3","gravatar_id":"","url":"https://api.github.com/users/alfpain","html_url":"https://github.com/alfpain","followers_url":"https://api.github.com/users/alfpain/followers","following_url":"https://api.github.com/users/alfpain/following{/other_user}","gists_url":"https://api.github.com/users/alfpain/gists{/gist_id}","starred_url":"https://api.github.com/users/alfpain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alfpain/subscriptions","organizations_url":"https://api.github.com/users/alfpain/orgs","repos_url":"https://api.github.com/users/alfpain/repos","events_url":"https://api.github.com/users/alfpain/events{/privacy}","received_events_url":"https://api.github.com/users/alfpain/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-03-06T15:30:23Z","updated_at":"2015-03-06T16:53:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"47b565220d4bab0184d6b5b1ccaf430496dc2a59","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/cognits/frontend-udacity-javascript/pulls/4/commits","review_comments_url":"https://api.github.com/repos/cognits/frontend-udacity-javascript/pulls/4/comments","review_comment_url":"https://api.github.com/repos/cognits/frontend-udacity-javascript/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cognits/frontend-udacity-javascript/issues/4/comments","statuses_url":"https://api.github.com/repos/cognits/frontend-udacity-javascript/statuses/b4e15a14b2776aed2e0210389ce0cda63519d44b","head":{"label":"alfpain:master","ref":"master","sha":"b4e15a14b2776aed2e0210389ce0cda63519d44b","user":{"login":"alfpain","id":9449743,"avatar_url":"https://avatars.githubusercontent.com/u/9449743?v=3","gravatar_id":"","url":"https://api.github.com/users/alfpain","html_url":"https://github.com/alfpain","followers_url":"https://api.github.com/users/alfpain/followers","following_url":"https://api.github.com/users/alfpain/following{/other_user}","gists_url":"https://api.github.com/users/alfpain/gists{/gist_id}","starred_url":"https://api.github.com/users/alfpain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alfpain/subscriptions","organizations_url":"https://api.github.com/users/alfpain/orgs","repos_url":"https://api.github.com/users/alfpain/repos","events_url":"https://api.github.com/users/alfpain/events{/privacy}","received_events_url":"https://api.github.com/users/alfpain/received_events","type":"User","site_admin":false},"repo":{"id":31774910,"name":"frontend-udacity-javascript","full_name":"alfpain/frontend-udacity-javascript","owner":{"login":"alfpain","id":9449743,"avatar_url":"https://avatars.githubusercontent.com/u/9449743?v=3","gravatar_id":"","url":"https://api.github.com/users/alfpain","html_url":"https://github.com/alfpain","followers_url":"https://api.github.com/users/alfpain/followers","following_url":"https://api.github.com/users/alfpain/following{/other_user}","gists_url":"https://api.github.com/users/alfpain/gists{/gist_id}","starred_url":"https://api.github.com/users/alfpain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alfpain/subscriptions","organizations_url":"https://api.github.com/users/alfpain/orgs","repos_url":"https://api.github.com/users/alfpain/repos","events_url":"https://api.github.com/users/alfpain/events{/privacy}","received_events_url":"https://api.github.com/users/alfpain/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/alfpain/frontend-udacity-javascript","description":"Complete Udacity's course Intro to Javascript basics","fork":true,"url":"https://api.github.com/repos/alfpain/frontend-udacity-javascript","forks_url":"https://api.github.com/repos/alfpain/frontend-udacity-javascript/forks","keys_url":"https://api.github.com/repos/alfpain/frontend-udacity-javascript/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alfpain/frontend-udacity-javascript/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alfpain/frontend-udacity-javascript/teams","hooks_url":"https://api.github.com/repos/alfpain/frontend-udacity-javascript/hooks","issue_events_url":"https://api.github.com/repos/alfpain/frontend-udacity-javascript/issues/events{/number}","events_url":"https://api.github.com/repos/alfpain/frontend-udacity-javascript/events","assignees_url":"https://api.github.com/repos/alfpain/frontend-udacity-javascript/assignees{/user}","branches_url":"https://api.github.com/repos/alfpain/frontend-udacity-javascript/branches{/branch}","tags_url":"https://api.github.com/repos/alfpain/frontend-udacity-javascript/tags","blobs_url":"https://api.github.com/repos/alfpain/frontend-udacity-javascript/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alfpain/frontend-udacity-javascript/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alfpain/frontend-udacity-javascript/git/refs{/sha}","trees_url":"https://api.github.com/repos/alfpain/frontend-udacity-javascript/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alfpain/frontend-udacity-javascript/statuses/{sha}","languages_url":"https://api.github.com/repos/alfpain/frontend-udacity-javascript/languages","stargazers_url":"https://api.github.com/repos/alfpain/frontend-udacity-javascript/stargazers","contributors_url":"https://api.github.com/repos/alfpain/frontend-udacity-javascript/contributors","subscribers_url":"https://api.github.com/repos/alfpain/frontend-udacity-javascript/subscribers","subscription_url":"https://api.github.com/repos/alfpain/frontend-udacity-javascript/subscription","commits_url":"https://api.github.com/repos/alfpain/frontend-udacity-javascript/commits{/sha}","git_commits_url":"https://api.github.com/repos/alfpain/frontend-udacity-javascript/git/commits{/sha}","comments_url":"https://api.github.com/repos/alfpain/frontend-udacity-javascript/comments{/number}","issue_comment_url":"https://api.github.com/repos/alfpain/frontend-udacity-javascript/issues/comments{/number}","contents_url":"https://api.github.com/repos/alfpain/frontend-udacity-javascript/contents/{+path}","compare_url":"https://api.github.com/repos/alfpain/frontend-udacity-javascript/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alfpain/frontend-udacity-javascript/merges","archive_url":"https://api.github.com/repos/alfpain/frontend-udacity-javascript/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alfpain/frontend-udacity-javascript/downloads","issues_url":"https://api.github.com/repos/alfpain/frontend-udacity-javascript/issues{/number}","pulls_url":"https://api.github.com/repos/alfpain/frontend-udacity-javascript/pulls{/number}","milestones_url":"https://api.github.com/repos/alfpain/frontend-udacity-javascript/milestones{/number}","notifications_url":"https://api.github.com/repos/alfpain/frontend-udacity-javascript/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alfpain/frontend-udacity-javascript/labels{/name}","releases_url":"https://api.github.com/repos/alfpain/frontend-udacity-javascript/releases{/id}","created_at":"2015-03-06T15:14:32Z","updated_at":"2015-03-06T15:25:35Z","pushed_at":"2015-03-06T15:25:35Z","git_url":"git://github.com/alfpain/frontend-udacity-javascript.git","ssh_url":"git@github.com:alfpain/frontend-udacity-javascript.git","clone_url":"https://github.com/alfpain/frontend-udacity-javascript.git","svn_url":"https://github.com/alfpain/frontend-udacity-javascript","homepage":null,"size":108,"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":"cognits:master","ref":"master","sha":"f459e976c31bf5ea5d7f802e9b480fce78f2e389","user":{"login":"cognits","id":9218159,"avatar_url":"https://avatars.githubusercontent.com/u/9218159?v=3","gravatar_id":"","url":"https://api.github.com/users/cognits","html_url":"https://github.com/cognits","followers_url":"https://api.github.com/users/cognits/followers","following_url":"https://api.github.com/users/cognits/following{/other_user}","gists_url":"https://api.github.com/users/cognits/gists{/gist_id}","starred_url":"https://api.github.com/users/cognits/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cognits/subscriptions","organizations_url":"https://api.github.com/users/cognits/orgs","repos_url":"https://api.github.com/users/cognits/repos","events_url":"https://api.github.com/users/cognits/events{/privacy}","received_events_url":"https://api.github.com/users/cognits/received_events","type":"Organization","site_admin":false},"repo":{"id":31215089,"name":"frontend-udacity-javascript","full_name":"cognits/frontend-udacity-javascript","owner":{"login":"cognits","id":9218159,"avatar_url":"https://avatars.githubusercontent.com/u/9218159?v=3","gravatar_id":"","url":"https://api.github.com/users/cognits","html_url":"https://github.com/cognits","followers_url":"https://api.github.com/users/cognits/followers","following_url":"https://api.github.com/users/cognits/following{/other_user}","gists_url":"https://api.github.com/users/cognits/gists{/gist_id}","starred_url":"https://api.github.com/users/cognits/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cognits/subscriptions","organizations_url":"https://api.github.com/users/cognits/orgs","repos_url":"https://api.github.com/users/cognits/repos","events_url":"https://api.github.com/users/cognits/events{/privacy}","received_events_url":"https://api.github.com/users/cognits/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cognits/frontend-udacity-javascript","description":"Complete Udacity's course Intro to Javascript basics","fork":false,"url":"https://api.github.com/repos/cognits/frontend-udacity-javascript","forks_url":"https://api.github.com/repos/cognits/frontend-udacity-javascript/forks","keys_url":"https://api.github.com/repos/cognits/frontend-udacity-javascript/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cognits/frontend-udacity-javascript/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cognits/frontend-udacity-javascript/teams","hooks_url":"https://api.github.com/repos/cognits/frontend-udacity-javascript/hooks","issue_events_url":"https://api.github.com/repos/cognits/frontend-udacity-javascript/issues/events{/number}","events_url":"https://api.github.com/repos/cognits/frontend-udacity-javascript/events","assignees_url":"https://api.github.com/repos/cognits/frontend-udacity-javascript/assignees{/user}","branches_url":"https://api.github.com/repos/cognits/frontend-udacity-javascript/branches{/branch}","tags_url":"https://api.github.com/repos/cognits/frontend-udacity-javascript/tags","blobs_url":"https://api.github.com/repos/cognits/frontend-udacity-javascript/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cognits/frontend-udacity-javascript/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cognits/frontend-udacity-javascript/git/refs{/sha}","trees_url":"https://api.github.com/repos/cognits/frontend-udacity-javascript/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cognits/frontend-udacity-javascript/statuses/{sha}","languages_url":"https://api.github.com/repos/cognits/frontend-udacity-javascript/languages","stargazers_url":"https://api.github.com/repos/cognits/frontend-udacity-javascript/stargazers","contributors_url":"https://api.github.com/repos/cognits/frontend-udacity-javascript/contributors","subscribers_url":"https://api.github.com/repos/cognits/frontend-udacity-javascript/subscribers","subscription_url":"https://api.github.com/repos/cognits/frontend-udacity-javascript/subscription","commits_url":"https://api.github.com/repos/cognits/frontend-udacity-javascript/commits{/sha}","git_commits_url":"https://api.github.com/repos/cognits/frontend-udacity-javascript/git/commits{/sha}","comments_url":"https://api.github.com/repos/cognits/frontend-udacity-javascript/comments{/number}","issue_comment_url":"https://api.github.com/repos/cognits/frontend-udacity-javascript/issues/comments{/number}","contents_url":"https://api.github.com/repos/cognits/frontend-udacity-javascript/contents/{+path}","compare_url":"https://api.github.com/repos/cognits/frontend-udacity-javascript/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cognits/frontend-udacity-javascript/merges","archive_url":"https://api.github.com/repos/cognits/frontend-udacity-javascript/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cognits/frontend-udacity-javascript/downloads","issues_url":"https://api.github.com/repos/cognits/frontend-udacity-javascript/issues{/number}","pulls_url":"https://api.github.com/repos/cognits/frontend-udacity-javascript/pulls{/number}","milestones_url":"https://api.github.com/repos/cognits/frontend-udacity-javascript/milestones{/number}","notifications_url":"https://api.github.com/repos/cognits/frontend-udacity-javascript/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cognits/frontend-udacity-javascript/labels{/name}","releases_url":"https://api.github.com/repos/cognits/frontend-udacity-javascript/releases{/id}","created_at":"2015-02-23T15:51:13Z","updated_at":"2015-02-23T15:51:13Z","pushed_at":"2015-02-23T15:52:52Z","git_url":"git://github.com/cognits/frontend-udacity-javascript.git","ssh_url":"git@github.com:cognits/frontend-udacity-javascript.git","clone_url":"https://github.com/cognits/frontend-udacity-javascript.git","svn_url":"https://github.com/cognits/frontend-udacity-javascript","homepage":null,"size":108,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":6,"forks":6,"open_issues":6,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cognits/frontend-udacity-javascript/pulls/4"},"html":{"href":"https://github.com/cognits/frontend-udacity-javascript/pull/4"},"issue":{"href":"https://api.github.com/repos/cognits/frontend-udacity-javascript/issues/4"},"comments":{"href":"https://api.github.com/repos/cognits/frontend-udacity-javascript/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/cognits/frontend-udacity-javascript/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/cognits/frontend-udacity-javascript/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cognits/frontend-udacity-javascript/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/cognits/frontend-udacity-javascript/statuses/b4e15a14b2776aed2e0210389ce0cda63519d44b"}}}}