{"action":"created","comment":{"url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/pulls/comments/266598256","pull_request_review_id":215797503,"id":266598256,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI2NjU5ODI1Ng==","diff_hunk":"@@ -359,6 +359,37 @@ const jsonapiModule = (api, conf = {}) => {\n \n // Helper methods\n \n+const addJvHelpers = (obj) => {\n+  // Add Utility functions to _jv child object\n+  Object.assign(obj[jvtag], {\n+    isRel(name) {\n+      return obj[jvtag]['relationships'].hasOwnProperty(name)\n+    },\n+    isAttr(name) {\n+      return name !== '_jv' && !this.isRel(name)","path":"src/jsonapi-vuex.js","position":11,"original_position":11,"commit_id":"32aaa32499c16f64ac98af0883f0c7b3e0f5242c","original_commit_id":"32aaa32499c16f64ac98af0883f0c7b3e0f5242c","user":{"login":"staaam","id":6422324,"node_id":"MDQ6VXNlcjY0MjIzMjQ=","avatar_url":"https://avatars3.githubusercontent.com/u/6422324?v=4","gravatar_id":"","url":"https://api.github.com/users/staaam","html_url":"https://github.com/staaam","followers_url":"https://api.github.com/users/staaam/followers","following_url":"https://api.github.com/users/staaam/following{/other_user}","gists_url":"https://api.github.com/users/staaam/gists{/gist_id}","starred_url":"https://api.github.com/users/staaam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/staaam/subscriptions","organizations_url":"https://api.github.com/users/staaam/orgs","repos_url":"https://api.github.com/users/staaam/repos","events_url":"https://api.github.com/users/staaam/events{/privacy}","received_events_url":"https://api.github.com/users/staaam/received_events","type":"User","site_admin":false},"body":"replace '_jv' with jvtag ?","created_at":"2019-03-18T19:08:41Z","updated_at":"2019-03-18T19:08:42Z","html_url":"https://github.com/mrichar1/jsonapi-vuex/pull/40#discussion_r266598256","pull_request_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/pulls/40","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/mrichar1/jsonapi-vuex/pulls/comments/266598256"},"html":{"href":"https://github.com/mrichar1/jsonapi-vuex/pull/40#discussion_r266598256"},"pull_request":{"href":"https://api.github.com/repos/mrichar1/jsonapi-vuex/pulls/40"}}},"pull_request":{"url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/pulls/40","id":262127415,"node_id":"MDExOlB1bGxSZXF1ZXN0MjYyMTI3NDE1","html_url":"https://github.com/mrichar1/jsonapi-vuex/pull/40","diff_url":"https://github.com/mrichar1/jsonapi-vuex/pull/40.diff","patch_url":"https://github.com/mrichar1/jsonapi-vuex/pull/40.patch","issue_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/issues/40","number":40,"state":"open","locked":false,"title":"addJVHelpers utility functions added.","user":{"login":"mrichar1","id":478653,"node_id":"MDQ6VXNlcjQ3ODY1Mw==","avatar_url":"https://avatars0.githubusercontent.com/u/478653?v=4","gravatar_id":"","url":"https://api.github.com/users/mrichar1","html_url":"https://github.com/mrichar1","followers_url":"https://api.github.com/users/mrichar1/followers","following_url":"https://api.github.com/users/mrichar1/following{/other_user}","gists_url":"https://api.github.com/users/mrichar1/gists{/gist_id}","starred_url":"https://api.github.com/users/mrichar1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrichar1/subscriptions","organizations_url":"https://api.github.com/users/mrichar1/orgs","repos_url":"https://api.github.com/users/mrichar1/repos","events_url":"https://api.github.com/users/mrichar1/events{/privacy}","received_events_url":"https://api.github.com/users/mrichar1/received_events","type":"User","site_admin":false},"body":"Fixes #23 \r\n\r\nCode adds utility functions to an existing object's `_jv` child object to allow `rels` and `attrs` introspection, as suggested in #23.\r\n\r\nTests are failing (as the root now contains relationships! :smile: ) so the test data will need modified to expect these.\r\n\r\n@staam let me know if this looks like what you were thinking of, and if so I'll update the tests(and add new ones for`addJvHelpers` (which probably needs a better name!)\r\n\r\n","created_at":"2019-03-18T16:17:09Z","updated_at":"2019-03-18T19:08:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7f69cabb8d9c4343a5d6883080d954bfb96d9016","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/pulls/40/commits","review_comments_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/pulls/40/comments","review_comment_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/issues/40/comments","statuses_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/statuses/32aaa32499c16f64ac98af0883f0c7b3e0f5242c","head":{"label":"mrichar1:root_rels","ref":"root_rels","sha":"32aaa32499c16f64ac98af0883f0c7b3e0f5242c","user":{"login":"mrichar1","id":478653,"node_id":"MDQ6VXNlcjQ3ODY1Mw==","avatar_url":"https://avatars0.githubusercontent.com/u/478653?v=4","gravatar_id":"","url":"https://api.github.com/users/mrichar1","html_url":"https://github.com/mrichar1","followers_url":"https://api.github.com/users/mrichar1/followers","following_url":"https://api.github.com/users/mrichar1/following{/other_user}","gists_url":"https://api.github.com/users/mrichar1/gists{/gist_id}","starred_url":"https://api.github.com/users/mrichar1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrichar1/subscriptions","organizations_url":"https://api.github.com/users/mrichar1/orgs","repos_url":"https://api.github.com/users/mrichar1/repos","events_url":"https://api.github.com/users/mrichar1/events{/privacy}","received_events_url":"https://api.github.com/users/mrichar1/received_events","type":"User","site_admin":false},"repo":{"id":152432820,"node_id":"MDEwOlJlcG9zaXRvcnkxNTI0MzI4MjA=","name":"jsonapi-vuex","full_name":"mrichar1/jsonapi-vuex","private":false,"owner":{"login":"mrichar1","id":478653,"node_id":"MDQ6VXNlcjQ3ODY1Mw==","avatar_url":"https://avatars0.githubusercontent.com/u/478653?v=4","gravatar_id":"","url":"https://api.github.com/users/mrichar1","html_url":"https://github.com/mrichar1","followers_url":"https://api.github.com/users/mrichar1/followers","following_url":"https://api.github.com/users/mrichar1/following{/other_user}","gists_url":"https://api.github.com/users/mrichar1/gists{/gist_id}","starred_url":"https://api.github.com/users/mrichar1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrichar1/subscriptions","organizations_url":"https://api.github.com/users/mrichar1/orgs","repos_url":"https://api.github.com/users/mrichar1/repos","events_url":"https://api.github.com/users/mrichar1/events{/privacy}","received_events_url":"https://api.github.com/users/mrichar1/received_events","type":"User","site_admin":false},"html_url":"https://github.com/mrichar1/jsonapi-vuex","description":"Use a JSONAPI api with a Vuex store, with data restructuring/normalization.","fork":false,"url":"https://api.github.com/repos/mrichar1/jsonapi-vuex","forks_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/forks","keys_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/teams","hooks_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/hooks","issue_events_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/issues/events{/number}","events_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/events","assignees_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/assignees{/user}","branches_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/branches{/branch}","tags_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/tags","blobs_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/git/refs{/sha}","trees_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/statuses/{sha}","languages_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/languages","stargazers_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/stargazers","contributors_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/contributors","subscribers_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/subscribers","subscription_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/subscription","commits_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/commits{/sha}","git_commits_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/git/commits{/sha}","comments_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/comments{/number}","issue_comment_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/issues/comments{/number}","contents_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/contents/{+path}","compare_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/merges","archive_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/downloads","issues_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/issues{/number}","pulls_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/pulls{/number}","milestones_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/milestones{/number}","notifications_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/labels{/name}","releases_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/releases{/id}","deployments_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/deployments","created_at":"2018-10-10T14:00:20Z","updated_at":"2019-03-18T17:08:02Z","pushed_at":"2019-03-18T17:29:30Z","git_url":"git://github.com/mrichar1/jsonapi-vuex.git","ssh_url":"git@github.com:mrichar1/jsonapi-vuex.git","clone_url":"https://github.com/mrichar1/jsonapi-vuex.git","svn_url":"https://github.com/mrichar1/jsonapi-vuex","homepage":"","size":502,"stargazers_count":19,"watchers_count":19,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":8,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":4,"open_issues":8,"watchers":19,"default_branch":"master"}},"base":{"label":"mrichar1:master","ref":"master","sha":"7f0844c1666dd267d2fabfe435dbfa88847dd12c","user":{"login":"mrichar1","id":478653,"node_id":"MDQ6VXNlcjQ3ODY1Mw==","avatar_url":"https://avatars0.githubusercontent.com/u/478653?v=4","gravatar_id":"","url":"https://api.github.com/users/mrichar1","html_url":"https://github.com/mrichar1","followers_url":"https://api.github.com/users/mrichar1/followers","following_url":"https://api.github.com/users/mrichar1/following{/other_user}","gists_url":"https://api.github.com/users/mrichar1/gists{/gist_id}","starred_url":"https://api.github.com/users/mrichar1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrichar1/subscriptions","organizations_url":"https://api.github.com/users/mrichar1/orgs","repos_url":"https://api.github.com/users/mrichar1/repos","events_url":"https://api.github.com/users/mrichar1/events{/privacy}","received_events_url":"https://api.github.com/users/mrichar1/received_events","type":"User","site_admin":false},"repo":{"id":152432820,"node_id":"MDEwOlJlcG9zaXRvcnkxNTI0MzI4MjA=","name":"jsonapi-vuex","full_name":"mrichar1/jsonapi-vuex","private":false,"owner":{"login":"mrichar1","id":478653,"node_id":"MDQ6VXNlcjQ3ODY1Mw==","avatar_url":"https://avatars0.githubusercontent.com/u/478653?v=4","gravatar_id":"","url":"https://api.github.com/users/mrichar1","html_url":"https://github.com/mrichar1","followers_url":"https://api.github.com/users/mrichar1/followers","following_url":"https://api.github.com/users/mrichar1/following{/other_user}","gists_url":"https://api.github.com/users/mrichar1/gists{/gist_id}","starred_url":"https://api.github.com/users/mrichar1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrichar1/subscriptions","organizations_url":"https://api.github.com/users/mrichar1/orgs","repos_url":"https://api.github.com/users/mrichar1/repos","events_url":"https://api.github.com/users/mrichar1/events{/privacy}","received_events_url":"https://api.github.com/users/mrichar1/received_events","type":"User","site_admin":false},"html_url":"https://github.com/mrichar1/jsonapi-vuex","description":"Use a JSONAPI api with a Vuex store, with data restructuring/normalization.","fork":false,"url":"https://api.github.com/repos/mrichar1/jsonapi-vuex","forks_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/forks","keys_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/teams","hooks_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/hooks","issue_events_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/issues/events{/number}","events_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/events","assignees_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/assignees{/user}","branches_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/branches{/branch}","tags_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/tags","blobs_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/git/refs{/sha}","trees_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/statuses/{sha}","languages_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/languages","stargazers_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/stargazers","contributors_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/contributors","subscribers_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/subscribers","subscription_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/subscription","commits_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/commits{/sha}","git_commits_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/git/commits{/sha}","comments_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/comments{/number}","issue_comment_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/issues/comments{/number}","contents_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/contents/{+path}","compare_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/merges","archive_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/downloads","issues_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/issues{/number}","pulls_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/pulls{/number}","milestones_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/milestones{/number}","notifications_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/labels{/name}","releases_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/releases{/id}","deployments_url":"https://api.github.com/repos/mrichar1/jsonapi-vuex/deployments","created_at":"2018-10-10T14:00:20Z","updated_at":"2019-03-18T17:08:02Z","pushed_at":"2019-03-18T17:29:30Z","git_url":"git://github.com/mrichar1/jsonapi-vuex.git","ssh_url":"git@github.com:mrichar1/jsonapi-vuex.git","clone_url":"https://github.com/mrichar1/jsonapi-vuex.git","svn_url":"https://github.com/mrichar1/jsonapi-vuex","homepage":"","size":502,"stargazers_count":19,"watchers_count":19,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":8,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":4,"open_issues":8,"watchers":19,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mrichar1/jsonapi-vuex/pulls/40"},"html":{"href":"https://github.com/mrichar1/jsonapi-vuex/pull/40"},"issue":{"href":"https://api.github.com/repos/mrichar1/jsonapi-vuex/issues/40"},"comments":{"href":"https://api.github.com/repos/mrichar1/jsonapi-vuex/issues/40/comments"},"review_comments":{"href":"https://api.github.com/repos/mrichar1/jsonapi-vuex/pulls/40/comments"},"review_comment":{"href":"https://api.github.com/repos/mrichar1/jsonapi-vuex/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mrichar1/jsonapi-vuex/pulls/40/commits"},"statuses":{"href":"https://api.github.com/repos/mrichar1/jsonapi-vuex/statuses/32aaa32499c16f64ac98af0883f0c7b3e0f5242c"}},"author_association":"OWNER"}}
{"actor":{"display_login":"staaam"}}