{"action":"created","comment":{"url":"https://api.github.com/repos/andela-sayidu/invertedIndex/pulls/comments/89288593","pull_request_review_id":9834363,"id":89288593,"diff_hunk":"@@ -0,0 +1,67 @@\n+const app = angular.module('myIndex', []);\n+\n+app.controller('indexController', ($scope) => {\n+  const index = new invertedIndex();\n+\n+  $scope.showTable = true;\n+  $scope.searchResults = false;\n+  $scope.titles = [];\n+\n+  $scope.uploadFile = (fileName, fileContent) => {\n+    $scope.data = {};\n+    $scope.docCount = [];\n+    if (fileName.toLowerCase().match(/\\.json$/)) {\n+      const reader = new FileReader();\n+      reader.onload = (e) => {\n+        let content = JSON.parse(e.target.result);\n+        index.createIndex(fileName, content);\n+        $scope.data = index.indexMap[fileName];\n+\n+        for (let fileNo = 0; fileNo < content.length; fileNo++) {\n+          $scope.docCount.push(fileNo);\n+        }\n+\n+        $scope.$apply($scope.docCount);\n+\n+      }\n+      reader.readAsText(fileContent);\n+\n+      $scope.$apply(() => {\n+        $scope.titles.push(fileName);\n+        $scope.selectedFiles = $scope.selectedFile;\n+      });\n+\n+    } else {\n+      $(document).ready(function () {\n+        $('#modal1').modal('open');\n+      });\n+    }\n+  }\n+\n+\n+  $scope.search = () => {\n+    $scope.showTable= false;\n+    $scope.searchResults = true;\n+    let searchValue = $scope.terms;\n+    let fileSearch =  $scope.selectedFile;\n+     if(fileName == 'all') {\n+       //  showTable\n+     } else{\n+       $scope.searchResult = index.searchIndex(fileSearch,searchValue);\n+     }\n+  }\n+\n+});\n+\n+\n+\n+document.addEventListener('DOMContentLoaded', () => {\n+  $('.modal-trigger').hide();","path":"src/scripts/app.js","position":59,"original_position":59,"commit_id":"b21fe4075aaedd655587710f136852663066f830","original_commit_id":"b21fe4075aaedd655587710f136852663066f830","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"'$' is not defined                                      no-undef","created_at":"2016-11-23T10:28:53Z","updated_at":"2016-11-23T10:28:53Z","html_url":"https://github.com/andela-sayidu/invertedIndex/pull/2#discussion_r89288593","pull_request_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/andela-sayidu/invertedIndex/pulls/comments/89288593"},"html":{"href":"https://github.com/andela-sayidu/invertedIndex/pull/2#discussion_r89288593"},"pull_request":{"href":"https://api.github.com/repos/andela-sayidu/invertedIndex/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/andela-sayidu/invertedIndex/pulls/2","id":94976592,"html_url":"https://github.com/andela-sayidu/invertedIndex/pull/2","diff_url":"https://github.com/andela-sayidu/invertedIndex/pull/2.diff","patch_url":"https://github.com/andela-sayidu/invertedIndex/pull/2.patch","issue_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/issues/2","number":2,"state":"open","locked":false,"title":"Pull request for pair review ","user":{"login":"andela-sayidu","id":23451229,"avatar_url":"https://avatars.githubusercontent.com/u/23451229?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-sayidu","html_url":"https://github.com/andela-sayidu","followers_url":"https://api.github.com/users/andela-sayidu/followers","following_url":"https://api.github.com/users/andela-sayidu/following{/other_user}","gists_url":"https://api.github.com/users/andela-sayidu/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-sayidu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-sayidu/subscriptions","organizations_url":"https://api.github.com/users/andela-sayidu/orgs","repos_url":"https://api.github.com/users/andela-sayidu/repos","events_url":"https://api.github.com/users/andela-sayidu/events{/privacy}","received_events_url":"https://api.github.com/users/andela-sayidu/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-11-23T10:28:42Z","updated_at":"2016-11-23T10:28:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6415554b93b8d0cda2d880ecf9fde9baa11ef28a","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/pulls/2/commits","review_comments_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/pulls/2/comments","review_comment_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/pulls/comments{/number}","comments_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/issues/2/comments","statuses_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/statuses/b21fe4075aaedd655587710f136852663066f830","head":{"label":"andela-sayidu:feature/Searchallfiles","ref":"feature/Searchallfiles","sha":"b21fe4075aaedd655587710f136852663066f830","user":{"login":"andela-sayidu","id":23451229,"avatar_url":"https://avatars.githubusercontent.com/u/23451229?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-sayidu","html_url":"https://github.com/andela-sayidu","followers_url":"https://api.github.com/users/andela-sayidu/followers","following_url":"https://api.github.com/users/andela-sayidu/following{/other_user}","gists_url":"https://api.github.com/users/andela-sayidu/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-sayidu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-sayidu/subscriptions","organizations_url":"https://api.github.com/users/andela-sayidu/orgs","repos_url":"https://api.github.com/users/andela-sayidu/repos","events_url":"https://api.github.com/users/andela-sayidu/events{/privacy}","received_events_url":"https://api.github.com/users/andela-sayidu/received_events","type":"User","site_admin":false},"repo":{"id":74242569,"name":"invertedIndex","full_name":"andela-sayidu/invertedIndex","owner":{"login":"andela-sayidu","id":23451229,"avatar_url":"https://avatars.githubusercontent.com/u/23451229?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-sayidu","html_url":"https://github.com/andela-sayidu","followers_url":"https://api.github.com/users/andela-sayidu/followers","following_url":"https://api.github.com/users/andela-sayidu/following{/other_user}","gists_url":"https://api.github.com/users/andela-sayidu/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-sayidu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-sayidu/subscriptions","organizations_url":"https://api.github.com/users/andela-sayidu/orgs","repos_url":"https://api.github.com/users/andela-sayidu/repos","events_url":"https://api.github.com/users/andela-sayidu/events{/privacy}","received_events_url":"https://api.github.com/users/andela-sayidu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andela-sayidu/invertedIndex","description":"Checkpoint 1: Inverted Index Project","fork":false,"url":"https://api.github.com/repos/andela-sayidu/invertedIndex","forks_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/forks","keys_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/teams","hooks_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/hooks","issue_events_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/issues/events{/number}","events_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/events","assignees_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/assignees{/user}","branches_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/branches{/branch}","tags_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/tags","blobs_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/git/refs{/sha}","trees_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/statuses/{sha}","languages_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/languages","stargazers_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/stargazers","contributors_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/contributors","subscribers_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/subscribers","subscription_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/subscription","commits_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/commits{/sha}","git_commits_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/git/commits{/sha}","comments_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/comments{/number}","issue_comment_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/issues/comments{/number}","contents_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/contents/{+path}","compare_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/merges","archive_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/downloads","issues_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/issues{/number}","pulls_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/pulls{/number}","milestones_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/milestones{/number}","notifications_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/labels{/name}","releases_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/releases{/id}","deployments_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/deployments","created_at":"2016-11-19T23:48:56Z","updated_at":"2016-11-20T07:26:00Z","pushed_at":"2016-11-23T10:28:42Z","git_url":"git://github.com/andela-sayidu/invertedIndex.git","ssh_url":"git@github.com:andela-sayidu/invertedIndex.git","clone_url":"https://github.com/andela-sayidu/invertedIndex.git","svn_url":"https://github.com/andela-sayidu/invertedIndex","homepage":null,"size":41017,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"andela-sayidu:master","ref":"master","sha":"8574f3465e0348d1b913aefcb06d15bac5ac063c","user":{"login":"andela-sayidu","id":23451229,"avatar_url":"https://avatars.githubusercontent.com/u/23451229?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-sayidu","html_url":"https://github.com/andela-sayidu","followers_url":"https://api.github.com/users/andela-sayidu/followers","following_url":"https://api.github.com/users/andela-sayidu/following{/other_user}","gists_url":"https://api.github.com/users/andela-sayidu/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-sayidu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-sayidu/subscriptions","organizations_url":"https://api.github.com/users/andela-sayidu/orgs","repos_url":"https://api.github.com/users/andela-sayidu/repos","events_url":"https://api.github.com/users/andela-sayidu/events{/privacy}","received_events_url":"https://api.github.com/users/andela-sayidu/received_events","type":"User","site_admin":false},"repo":{"id":74242569,"name":"invertedIndex","full_name":"andela-sayidu/invertedIndex","owner":{"login":"andela-sayidu","id":23451229,"avatar_url":"https://avatars.githubusercontent.com/u/23451229?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-sayidu","html_url":"https://github.com/andela-sayidu","followers_url":"https://api.github.com/users/andela-sayidu/followers","following_url":"https://api.github.com/users/andela-sayidu/following{/other_user}","gists_url":"https://api.github.com/users/andela-sayidu/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-sayidu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-sayidu/subscriptions","organizations_url":"https://api.github.com/users/andela-sayidu/orgs","repos_url":"https://api.github.com/users/andela-sayidu/repos","events_url":"https://api.github.com/users/andela-sayidu/events{/privacy}","received_events_url":"https://api.github.com/users/andela-sayidu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andela-sayidu/invertedIndex","description":"Checkpoint 1: Inverted Index Project","fork":false,"url":"https://api.github.com/repos/andela-sayidu/invertedIndex","forks_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/forks","keys_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/teams","hooks_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/hooks","issue_events_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/issues/events{/number}","events_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/events","assignees_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/assignees{/user}","branches_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/branches{/branch}","tags_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/tags","blobs_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/git/refs{/sha}","trees_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/statuses/{sha}","languages_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/languages","stargazers_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/stargazers","contributors_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/contributors","subscribers_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/subscribers","subscription_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/subscription","commits_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/commits{/sha}","git_commits_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/git/commits{/sha}","comments_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/comments{/number}","issue_comment_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/issues/comments{/number}","contents_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/contents/{+path}","compare_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/merges","archive_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/downloads","issues_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/issues{/number}","pulls_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/pulls{/number}","milestones_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/milestones{/number}","notifications_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/labels{/name}","releases_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/releases{/id}","deployments_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/deployments","created_at":"2016-11-19T23:48:56Z","updated_at":"2016-11-20T07:26:00Z","pushed_at":"2016-11-23T10:28:42Z","git_url":"git://github.com/andela-sayidu/invertedIndex.git","ssh_url":"git@github.com:andela-sayidu/invertedIndex.git","clone_url":"https://github.com/andela-sayidu/invertedIndex.git","svn_url":"https://github.com/andela-sayidu/invertedIndex","homepage":null,"size":41017,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/andela-sayidu/invertedIndex/pulls/2"},"html":{"href":"https://github.com/andela-sayidu/invertedIndex/pull/2"},"issue":{"href":"https://api.github.com/repos/andela-sayidu/invertedIndex/issues/2"},"comments":{"href":"https://api.github.com/repos/andela-sayidu/invertedIndex/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/andela-sayidu/invertedIndex/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/andela-sayidu/invertedIndex/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/andela-sayidu/invertedIndex/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/andela-sayidu/invertedIndex/statuses/b21fe4075aaedd655587710f136852663066f830"}}}}
{"actor":{"display_login":"houndci-bot"}}