{"action":"created","comment":{"url":"https://api.github.com/repos/andela-emabishi/inverted-index/pulls/comments/67622750","id":67622750,"diff_hunk":"@@ -0,0 +1,149 @@\n+class Index {\n+\n+    // Method to create an inverted-index of the documents\n+    createIndex(filePath) {\n+\n+        // Here, self refers to the Index object\n+        var self = this;\n+\n+        // Initialise Object to store the inverted-index\n+        this.indexObj = {};\n+\n+        /* Fetch the document \n+         * Resolve the promise and store the data in a variable, 'finallySomeData'\n+         */\n+        return fetch(filePath).then(function(response) {\n+            return response.json();\n+\n+        })\n+\n+        .then(function(finallySomeData) {\n+            self.books = finallySomeData;\n+\n+            // Call the populateIndex function to create the inverted-index\n+            populateIndex();\n+\n+        });\n+\n+        function populateIndex() {\n+            // Iterate through the data obtaining each book's position in the document.\n+            self.books.forEach((book, docIndex) => {","path":"jasmine/src/inverted-index.js","position":30,"original_position":30,"commit_id":"b80a70d201fe537a5d35ef66c8b4a68b41b31677","original_commit_id":"b80a70d201fe537a5d35ef66c8b4a68b41b31677","user":{"login":"andela-ekupara","id":16223673,"avatar_url":"https://avatars.githubusercontent.com/u/16223673?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-ekupara","html_url":"https://github.com/andela-ekupara","followers_url":"https://api.github.com/users/andela-ekupara/followers","following_url":"https://api.github.com/users/andela-ekupara/following{/other_user}","gists_url":"https://api.github.com/users/andela-ekupara/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-ekupara/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-ekupara/subscriptions","organizations_url":"https://api.github.com/users/andela-ekupara/orgs","repos_url":"https://api.github.com/users/andela-ekupara/repos","events_url":"https://api.github.com/users/andela-ekupara/events{/privacy}","received_events_url":"https://api.github.com/users/andela-ekupara/received_events","type":"User","site_admin":false},"body":"**Code Quality - Nitpick**\r\n\r\nI see you have used an arrow function here and on line 42 but not on line 15. Try chose one over the other and use it consistently.","created_at":"2016-06-19T19:48:49Z","updated_at":"2016-06-19T19:48:49Z","html_url":"https://github.com/andela-emabishi/inverted-index/pull/1#discussion_r67622750","pull_request_url":"https://api.github.com/repos/andela-emabishi/inverted-index/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/andela-emabishi/inverted-index/pulls/comments/67622750"},"html":{"href":"https://github.com/andela-emabishi/inverted-index/pull/1#discussion_r67622750"},"pull_request":{"href":"https://api.github.com/repos/andela-emabishi/inverted-index/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/andela-emabishi/inverted-index/pulls/1","id":72532108,"html_url":"https://github.com/andela-emabishi/inverted-index/pull/1","diff_url":"https://github.com/andela-emabishi/inverted-index/pull/1.diff","patch_url":"https://github.com/andela-emabishi/inverted-index/pull/1.patch","issue_url":"https://api.github.com/repos/andela-emabishi/inverted-index/issues/1","number":1,"state":"open","locked":false,"title":"Dev","user":{"login":"andela-emabishi","id":19430113,"avatar_url":"https://avatars.githubusercontent.com/u/19430113?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-emabishi","html_url":"https://github.com/andela-emabishi","followers_url":"https://api.github.com/users/andela-emabishi/followers","following_url":"https://api.github.com/users/andela-emabishi/following{/other_user}","gists_url":"https://api.github.com/users/andela-emabishi/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-emabishi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-emabishi/subscriptions","organizations_url":"https://api.github.com/users/andela-emabishi/orgs","repos_url":"https://api.github.com/users/andela-emabishi/repos","events_url":"https://api.github.com/users/andela-emabishi/events{/privacy}","received_events_url":"https://api.github.com/users/andela-emabishi/received_events","type":"User","site_admin":false},"body":"Hound style check","created_at":"2016-06-03T16:12:01Z","updated_at":"2016-06-19T19:48:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4b69e0cae04d9d9db600d73aad56d8ae027c5904","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/andela-emabishi/inverted-index/pulls/1/commits","review_comments_url":"https://api.github.com/repos/andela-emabishi/inverted-index/pulls/1/comments","review_comment_url":"https://api.github.com/repos/andela-emabishi/inverted-index/pulls/comments{/number}","comments_url":"https://api.github.com/repos/andela-emabishi/inverted-index/issues/1/comments","statuses_url":"https://api.github.com/repos/andela-emabishi/inverted-index/statuses/b80a70d201fe537a5d35ef66c8b4a68b41b31677","head":{"label":"andela-emabishi:dev","ref":"dev","sha":"b80a70d201fe537a5d35ef66c8b4a68b41b31677","user":{"login":"andela-emabishi","id":19430113,"avatar_url":"https://avatars.githubusercontent.com/u/19430113?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-emabishi","html_url":"https://github.com/andela-emabishi","followers_url":"https://api.github.com/users/andela-emabishi/followers","following_url":"https://api.github.com/users/andela-emabishi/following{/other_user}","gists_url":"https://api.github.com/users/andela-emabishi/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-emabishi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-emabishi/subscriptions","organizations_url":"https://api.github.com/users/andela-emabishi/orgs","repos_url":"https://api.github.com/users/andela-emabishi/repos","events_url":"https://api.github.com/users/andela-emabishi/events{/privacy}","received_events_url":"https://api.github.com/users/andela-emabishi/received_events","type":"User","site_admin":false},"repo":{"id":60010637,"name":"inverted-index","full_name":"andela-emabishi/inverted-index","owner":{"login":"andela-emabishi","id":19430113,"avatar_url":"https://avatars.githubusercontent.com/u/19430113?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-emabishi","html_url":"https://github.com/andela-emabishi","followers_url":"https://api.github.com/users/andela-emabishi/followers","following_url":"https://api.github.com/users/andela-emabishi/following{/other_user}","gists_url":"https://api.github.com/users/andela-emabishi/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-emabishi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-emabishi/subscriptions","organizations_url":"https://api.github.com/users/andela-emabishi/orgs","repos_url":"https://api.github.com/users/andela-emabishi/repos","events_url":"https://api.github.com/users/andela-emabishi/events{/privacy}","received_events_url":"https://api.github.com/users/andela-emabishi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andela-emabishi/inverted-index","description":"Javascript Checkpoint 1: Develop an inverted index object that takes a JSON array of text objects and creates an index from the array. The index allows a user to search for text blocks in the array that contain a specified collection of words.","fork":false,"url":"https://api.github.com/repos/andela-emabishi/inverted-index","forks_url":"https://api.github.com/repos/andela-emabishi/inverted-index/forks","keys_url":"https://api.github.com/repos/andela-emabishi/inverted-index/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andela-emabishi/inverted-index/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andela-emabishi/inverted-index/teams","hooks_url":"https://api.github.com/repos/andela-emabishi/inverted-index/hooks","issue_events_url":"https://api.github.com/repos/andela-emabishi/inverted-index/issues/events{/number}","events_url":"https://api.github.com/repos/andela-emabishi/inverted-index/events","assignees_url":"https://api.github.com/repos/andela-emabishi/inverted-index/assignees{/user}","branches_url":"https://api.github.com/repos/andela-emabishi/inverted-index/branches{/branch}","tags_url":"https://api.github.com/repos/andela-emabishi/inverted-index/tags","blobs_url":"https://api.github.com/repos/andela-emabishi/inverted-index/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andela-emabishi/inverted-index/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andela-emabishi/inverted-index/git/refs{/sha}","trees_url":"https://api.github.com/repos/andela-emabishi/inverted-index/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andela-emabishi/inverted-index/statuses/{sha}","languages_url":"https://api.github.com/repos/andela-emabishi/inverted-index/languages","stargazers_url":"https://api.github.com/repos/andela-emabishi/inverted-index/stargazers","contributors_url":"https://api.github.com/repos/andela-emabishi/inverted-index/contributors","subscribers_url":"https://api.github.com/repos/andela-emabishi/inverted-index/subscribers","subscription_url":"https://api.github.com/repos/andela-emabishi/inverted-index/subscription","commits_url":"https://api.github.com/repos/andela-emabishi/inverted-index/commits{/sha}","git_commits_url":"https://api.github.com/repos/andela-emabishi/inverted-index/git/commits{/sha}","comments_url":"https://api.github.com/repos/andela-emabishi/inverted-index/comments{/number}","issue_comment_url":"https://api.github.com/repos/andela-emabishi/inverted-index/issues/comments{/number}","contents_url":"https://api.github.com/repos/andela-emabishi/inverted-index/contents/{+path}","compare_url":"https://api.github.com/repos/andela-emabishi/inverted-index/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andela-emabishi/inverted-index/merges","archive_url":"https://api.github.com/repos/andela-emabishi/inverted-index/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andela-emabishi/inverted-index/downloads","issues_url":"https://api.github.com/repos/andela-emabishi/inverted-index/issues{/number}","pulls_url":"https://api.github.com/repos/andela-emabishi/inverted-index/pulls{/number}","milestones_url":"https://api.github.com/repos/andela-emabishi/inverted-index/milestones{/number}","notifications_url":"https://api.github.com/repos/andela-emabishi/inverted-index/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andela-emabishi/inverted-index/labels{/name}","releases_url":"https://api.github.com/repos/andela-emabishi/inverted-index/releases{/id}","deployments_url":"https://api.github.com/repos/andela-emabishi/inverted-index/deployments","created_at":"2016-05-30T13:05:16Z","updated_at":"2016-05-30T13:24:34Z","pushed_at":"2016-06-19T19:08:56Z","git_url":"git://github.com/andela-emabishi/inverted-index.git","ssh_url":"git@github.com:andela-emabishi/inverted-index.git","clone_url":"https://github.com/andela-emabishi/inverted-index.git","svn_url":"https://github.com/andela-emabishi/inverted-index","homepage":null,"size":92,"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-emabishi:master","ref":"master","sha":"a2454b98aa3c678532bc94cf6ba24ae4282d7abf","user":{"login":"andela-emabishi","id":19430113,"avatar_url":"https://avatars.githubusercontent.com/u/19430113?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-emabishi","html_url":"https://github.com/andela-emabishi","followers_url":"https://api.github.com/users/andela-emabishi/followers","following_url":"https://api.github.com/users/andela-emabishi/following{/other_user}","gists_url":"https://api.github.com/users/andela-emabishi/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-emabishi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-emabishi/subscriptions","organizations_url":"https://api.github.com/users/andela-emabishi/orgs","repos_url":"https://api.github.com/users/andela-emabishi/repos","events_url":"https://api.github.com/users/andela-emabishi/events{/privacy}","received_events_url":"https://api.github.com/users/andela-emabishi/received_events","type":"User","site_admin":false},"repo":{"id":60010637,"name":"inverted-index","full_name":"andela-emabishi/inverted-index","owner":{"login":"andela-emabishi","id":19430113,"avatar_url":"https://avatars.githubusercontent.com/u/19430113?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-emabishi","html_url":"https://github.com/andela-emabishi","followers_url":"https://api.github.com/users/andela-emabishi/followers","following_url":"https://api.github.com/users/andela-emabishi/following{/other_user}","gists_url":"https://api.github.com/users/andela-emabishi/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-emabishi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-emabishi/subscriptions","organizations_url":"https://api.github.com/users/andela-emabishi/orgs","repos_url":"https://api.github.com/users/andela-emabishi/repos","events_url":"https://api.github.com/users/andela-emabishi/events{/privacy}","received_events_url":"https://api.github.com/users/andela-emabishi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andela-emabishi/inverted-index","description":"Javascript Checkpoint 1: Develop an inverted index object that takes a JSON array of text objects and creates an index from the array. The index allows a user to search for text blocks in the array that contain a specified collection of words.","fork":false,"url":"https://api.github.com/repos/andela-emabishi/inverted-index","forks_url":"https://api.github.com/repos/andela-emabishi/inverted-index/forks","keys_url":"https://api.github.com/repos/andela-emabishi/inverted-index/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andela-emabishi/inverted-index/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andela-emabishi/inverted-index/teams","hooks_url":"https://api.github.com/repos/andela-emabishi/inverted-index/hooks","issue_events_url":"https://api.github.com/repos/andela-emabishi/inverted-index/issues/events{/number}","events_url":"https://api.github.com/repos/andela-emabishi/inverted-index/events","assignees_url":"https://api.github.com/repos/andela-emabishi/inverted-index/assignees{/user}","branches_url":"https://api.github.com/repos/andela-emabishi/inverted-index/branches{/branch}","tags_url":"https://api.github.com/repos/andela-emabishi/inverted-index/tags","blobs_url":"https://api.github.com/repos/andela-emabishi/inverted-index/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andela-emabishi/inverted-index/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andela-emabishi/inverted-index/git/refs{/sha}","trees_url":"https://api.github.com/repos/andela-emabishi/inverted-index/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andela-emabishi/inverted-index/statuses/{sha}","languages_url":"https://api.github.com/repos/andela-emabishi/inverted-index/languages","stargazers_url":"https://api.github.com/repos/andela-emabishi/inverted-index/stargazers","contributors_url":"https://api.github.com/repos/andela-emabishi/inverted-index/contributors","subscribers_url":"https://api.github.com/repos/andela-emabishi/inverted-index/subscribers","subscription_url":"https://api.github.com/repos/andela-emabishi/inverted-index/subscription","commits_url":"https://api.github.com/repos/andela-emabishi/inverted-index/commits{/sha}","git_commits_url":"https://api.github.com/repos/andela-emabishi/inverted-index/git/commits{/sha}","comments_url":"https://api.github.com/repos/andela-emabishi/inverted-index/comments{/number}","issue_comment_url":"https://api.github.com/repos/andela-emabishi/inverted-index/issues/comments{/number}","contents_url":"https://api.github.com/repos/andela-emabishi/inverted-index/contents/{+path}","compare_url":"https://api.github.com/repos/andela-emabishi/inverted-index/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andela-emabishi/inverted-index/merges","archive_url":"https://api.github.com/repos/andela-emabishi/inverted-index/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andela-emabishi/inverted-index/downloads","issues_url":"https://api.github.com/repos/andela-emabishi/inverted-index/issues{/number}","pulls_url":"https://api.github.com/repos/andela-emabishi/inverted-index/pulls{/number}","milestones_url":"https://api.github.com/repos/andela-emabishi/inverted-index/milestones{/number}","notifications_url":"https://api.github.com/repos/andela-emabishi/inverted-index/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andela-emabishi/inverted-index/labels{/name}","releases_url":"https://api.github.com/repos/andela-emabishi/inverted-index/releases{/id}","deployments_url":"https://api.github.com/repos/andela-emabishi/inverted-index/deployments","created_at":"2016-05-30T13:05:16Z","updated_at":"2016-05-30T13:24:34Z","pushed_at":"2016-06-19T19:08:56Z","git_url":"git://github.com/andela-emabishi/inverted-index.git","ssh_url":"git@github.com:andela-emabishi/inverted-index.git","clone_url":"https://github.com/andela-emabishi/inverted-index.git","svn_url":"https://github.com/andela-emabishi/inverted-index","homepage":null,"size":92,"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-emabishi/inverted-index/pulls/1"},"html":{"href":"https://github.com/andela-emabishi/inverted-index/pull/1"},"issue":{"href":"https://api.github.com/repos/andela-emabishi/inverted-index/issues/1"},"comments":{"href":"https://api.github.com/repos/andela-emabishi/inverted-index/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/andela-emabishi/inverted-index/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/andela-emabishi/inverted-index/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/andela-emabishi/inverted-index/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/andela-emabishi/inverted-index/statuses/b80a70d201fe537a5d35ef66c8b4a68b41b31677"}}}}
{"actor":{"display_login":"andela-ekupara"}}