{"action":"created","comment":{"url":"https://api.github.com/repos/refractproject/minim/pulls/comments/35400169","id":35400169,"diff_hunk":"@@ -84,11 +84,11 @@ describe('BaseElement', function() {\n     });\n \n     it('returns true when they are equal', function() {\n-      expect(el.id.equals('foobar')).to.be.true;","path":"test/primitives/base-element-test.js","position":4,"original_position":4,"commit_id":"c70510e4fb88cf633a239be8c6cd8620cee78cea","original_commit_id":"c70510e4fb88cf633a239be8c6cd8620cee78cea","user":{"login":"danielgtaylor","id":106826,"avatar_url":"https://avatars.githubusercontent.com/u/106826?v=3","gravatar_id":"","url":"https://api.github.com/users/danielgtaylor","html_url":"https://github.com/danielgtaylor","followers_url":"https://api.github.com/users/danielgtaylor/followers","following_url":"https://api.github.com/users/danielgtaylor/following{/other_user}","gists_url":"https://api.github.com/users/danielgtaylor/gists{/gist_id}","starred_url":"https://api.github.com/users/danielgtaylor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielgtaylor/subscriptions","organizations_url":"https://api.github.com/users/danielgtaylor/orgs","repos_url":"https://api.github.com/users/danielgtaylor/repos","events_url":"https://api.github.com/users/danielgtaylor/events{/privacy}","received_events_url":"https://api.github.com/users/danielgtaylor/received_events","type":"User","site_admin":false},"body":"@pksunkara yes, this allows this sort of (very common) stuff:\r\n\r\n```js\r\n// Simple value access\r\nconsole.log(el.id);\r\n\r\n// Simple value assignment\r\nel.id = 'abc123';\r\n\r\n// You still have full access to the element the long way:\r\nel.meta.get('id').attributes.set('encoding', 'utf-8');\r\n```\r\n\r\nThat last example isn't realistic for the ID, but a language or encoding attribute might make sense for description or response body content in the API namespace.","created_at":"2015-07-24T07:13:02Z","updated_at":"2015-07-24T07:13:02Z","html_url":"https://github.com/refractproject/minim/pull/66#discussion_r35400169","pull_request_url":"https://api.github.com/repos/refractproject/minim/pulls/66","_links":{"self":{"href":"https://api.github.com/repos/refractproject/minim/pulls/comments/35400169"},"html":{"href":"https://github.com/refractproject/minim/pull/66#discussion_r35400169"},"pull_request":{"href":"https://api.github.com/repos/refractproject/minim/pulls/66"}}},"pull_request":{"url":"https://api.github.com/repos/refractproject/minim/pulls/66","id":40456557,"html_url":"https://github.com/refractproject/minim/pull/66","diff_url":"https://github.com/refractproject/minim/pull/66.diff","patch_url":"https://github.com/refractproject/minim/pull/66.patch","issue_url":"https://api.github.com/repos/refractproject/minim/issues/66","number":66,"state":"open","locked":false,"title":"Return value result from simple types for convenience attributes.","user":{"login":"danielgtaylor","id":106826,"avatar_url":"https://avatars.githubusercontent.com/u/106826?v=3","gravatar_id":"","url":"https://api.github.com/users/danielgtaylor","html_url":"https://github.com/danielgtaylor","followers_url":"https://api.github.com/users/danielgtaylor/followers","following_url":"https://api.github.com/users/danielgtaylor/following{/other_user}","gists_url":"https://api.github.com/users/danielgtaylor/gists{/gist_id}","starred_url":"https://api.github.com/users/danielgtaylor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielgtaylor/subscriptions","organizations_url":"https://api.github.com/users/danielgtaylor/orgs","repos_url":"https://api.github.com/users/danielgtaylor/repos","events_url":"https://api.github.com/users/danielgtaylor/events{/privacy}","received_events_url":"https://api.github.com/users/danielgtaylor/received_events","type":"User","site_admin":false},"body":"This changes the return value of the convenience attributes (e.g. `id`,\r\n`title`, etc) to return the result of `.toValue()`. It **only** does so for\r\nsimple types (string, number, boolean, null) and leaves more complex types\r\nalone.\r\n\r\n```js\r\nconsole.log(element.title); // => 'I am a title'\r\nconsole.log(element.description); // => ''\r\n\r\n// Since `class` is an array, it is still an element instance\r\nif (element.class.contains('foo')) {\r\n  console.log('Contains foo.');\r\n}\r\n```\r\n\r\ncc @smizell - any other thoughts on whether `.class` should be an array vs. ArrayElement instance? It seems super useful to keep it as an element instance, but makes accessing the strings within a bit harder.","created_at":"2015-07-21T13:27:25Z","updated_at":"2015-07-24T07:13:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"05c58eab31c6a1143dc7a87e542d1478fd08f737","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/refractproject/minim/pulls/66/commits","review_comments_url":"https://api.github.com/repos/refractproject/minim/pulls/66/comments","review_comment_url":"https://api.github.com/repos/refractproject/minim/pulls/comments{/number}","comments_url":"https://api.github.com/repos/refractproject/minim/issues/66/comments","statuses_url":"https://api.github.com/repos/refractproject/minim/statuses/c70510e4fb88cf633a239be8c6cd8620cee78cea","head":{"label":"danielgtaylor:daniel/convenience-to-value","ref":"daniel/convenience-to-value","sha":"c70510e4fb88cf633a239be8c6cd8620cee78cea","user":{"login":"danielgtaylor","id":106826,"avatar_url":"https://avatars.githubusercontent.com/u/106826?v=3","gravatar_id":"","url":"https://api.github.com/users/danielgtaylor","html_url":"https://github.com/danielgtaylor","followers_url":"https://api.github.com/users/danielgtaylor/followers","following_url":"https://api.github.com/users/danielgtaylor/following{/other_user}","gists_url":"https://api.github.com/users/danielgtaylor/gists{/gist_id}","starred_url":"https://api.github.com/users/danielgtaylor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielgtaylor/subscriptions","organizations_url":"https://api.github.com/users/danielgtaylor/orgs","repos_url":"https://api.github.com/users/danielgtaylor/repos","events_url":"https://api.github.com/users/danielgtaylor/events{/privacy}","received_events_url":"https://api.github.com/users/danielgtaylor/received_events","type":"User","site_admin":false},"repo":{"id":35580675,"name":"minim","full_name":"danielgtaylor/minim","owner":{"login":"danielgtaylor","id":106826,"avatar_url":"https://avatars.githubusercontent.com/u/106826?v=3","gravatar_id":"","url":"https://api.github.com/users/danielgtaylor","html_url":"https://github.com/danielgtaylor","followers_url":"https://api.github.com/users/danielgtaylor/followers","following_url":"https://api.github.com/users/danielgtaylor/following{/other_user}","gists_url":"https://api.github.com/users/danielgtaylor/gists{/gist_id}","starred_url":"https://api.github.com/users/danielgtaylor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielgtaylor/subscriptions","organizations_url":"https://api.github.com/users/danielgtaylor/orgs","repos_url":"https://api.github.com/users/danielgtaylor/repos","events_url":"https://api.github.com/users/danielgtaylor/events{/privacy}","received_events_url":"https://api.github.com/users/danielgtaylor/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/danielgtaylor/minim","description":"A library for interacting with Refract elements","fork":true,"url":"https://api.github.com/repos/danielgtaylor/minim","forks_url":"https://api.github.com/repos/danielgtaylor/minim/forks","keys_url":"https://api.github.com/repos/danielgtaylor/minim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/danielgtaylor/minim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/danielgtaylor/minim/teams","hooks_url":"https://api.github.com/repos/danielgtaylor/minim/hooks","issue_events_url":"https://api.github.com/repos/danielgtaylor/minim/issues/events{/number}","events_url":"https://api.github.com/repos/danielgtaylor/minim/events","assignees_url":"https://api.github.com/repos/danielgtaylor/minim/assignees{/user}","branches_url":"https://api.github.com/repos/danielgtaylor/minim/branches{/branch}","tags_url":"https://api.github.com/repos/danielgtaylor/minim/tags","blobs_url":"https://api.github.com/repos/danielgtaylor/minim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/danielgtaylor/minim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/danielgtaylor/minim/git/refs{/sha}","trees_url":"https://api.github.com/repos/danielgtaylor/minim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/danielgtaylor/minim/statuses/{sha}","languages_url":"https://api.github.com/repos/danielgtaylor/minim/languages","stargazers_url":"https://api.github.com/repos/danielgtaylor/minim/stargazers","contributors_url":"https://api.github.com/repos/danielgtaylor/minim/contributors","subscribers_url":"https://api.github.com/repos/danielgtaylor/minim/subscribers","subscription_url":"https://api.github.com/repos/danielgtaylor/minim/subscription","commits_url":"https://api.github.com/repos/danielgtaylor/minim/commits{/sha}","git_commits_url":"https://api.github.com/repos/danielgtaylor/minim/git/commits{/sha}","comments_url":"https://api.github.com/repos/danielgtaylor/minim/comments{/number}","issue_comment_url":"https://api.github.com/repos/danielgtaylor/minim/issues/comments{/number}","contents_url":"https://api.github.com/repos/danielgtaylor/minim/contents/{+path}","compare_url":"https://api.github.com/repos/danielgtaylor/minim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/danielgtaylor/minim/merges","archive_url":"https://api.github.com/repos/danielgtaylor/minim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/danielgtaylor/minim/downloads","issues_url":"https://api.github.com/repos/danielgtaylor/minim/issues{/number}","pulls_url":"https://api.github.com/repos/danielgtaylor/minim/pulls{/number}","milestones_url":"https://api.github.com/repos/danielgtaylor/minim/milestones{/number}","notifications_url":"https://api.github.com/repos/danielgtaylor/minim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/danielgtaylor/minim/labels{/name}","releases_url":"https://api.github.com/repos/danielgtaylor/minim/releases{/id}","created_at":"2015-05-14T00:05:04Z","updated_at":"2015-05-14T00:05:31Z","pushed_at":"2015-07-21T13:24:45Z","git_url":"git://github.com/danielgtaylor/minim.git","ssh_url":"git@github.com:danielgtaylor/minim.git","clone_url":"https://github.com/danielgtaylor/minim.git","svn_url":"https://github.com/danielgtaylor/minim","homepage":"","size":250,"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":"refractproject:master","ref":"master","sha":"cb535661329d3d371894fdacc5812ad96dcdbcce","user":{"login":"refractproject","id":10877387,"avatar_url":"https://avatars.githubusercontent.com/u/10877387?v=3","gravatar_id":"","url":"https://api.github.com/users/refractproject","html_url":"https://github.com/refractproject","followers_url":"https://api.github.com/users/refractproject/followers","following_url":"https://api.github.com/users/refractproject/following{/other_user}","gists_url":"https://api.github.com/users/refractproject/gists{/gist_id}","starred_url":"https://api.github.com/users/refractproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/refractproject/subscriptions","organizations_url":"https://api.github.com/users/refractproject/orgs","repos_url":"https://api.github.com/users/refractproject/repos","events_url":"https://api.github.com/users/refractproject/events{/privacy}","received_events_url":"https://api.github.com/users/refractproject/received_events","type":"Organization","site_admin":false},"repo":{"id":29806257,"name":"minim","full_name":"refractproject/minim","owner":{"login":"refractproject","id":10877387,"avatar_url":"https://avatars.githubusercontent.com/u/10877387?v=3","gravatar_id":"","url":"https://api.github.com/users/refractproject","html_url":"https://github.com/refractproject","followers_url":"https://api.github.com/users/refractproject/followers","following_url":"https://api.github.com/users/refractproject/following{/other_user}","gists_url":"https://api.github.com/users/refractproject/gists{/gist_id}","starred_url":"https://api.github.com/users/refractproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/refractproject/subscriptions","organizations_url":"https://api.github.com/users/refractproject/orgs","repos_url":"https://api.github.com/users/refractproject/repos","events_url":"https://api.github.com/users/refractproject/events{/privacy}","received_events_url":"https://api.github.com/users/refractproject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/refractproject/minim","description":"A library for interacting with Refract elements","fork":false,"url":"https://api.github.com/repos/refractproject/minim","forks_url":"https://api.github.com/repos/refractproject/minim/forks","keys_url":"https://api.github.com/repos/refractproject/minim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/refractproject/minim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/refractproject/minim/teams","hooks_url":"https://api.github.com/repos/refractproject/minim/hooks","issue_events_url":"https://api.github.com/repos/refractproject/minim/issues/events{/number}","events_url":"https://api.github.com/repos/refractproject/minim/events","assignees_url":"https://api.github.com/repos/refractproject/minim/assignees{/user}","branches_url":"https://api.github.com/repos/refractproject/minim/branches{/branch}","tags_url":"https://api.github.com/repos/refractproject/minim/tags","blobs_url":"https://api.github.com/repos/refractproject/minim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/refractproject/minim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/refractproject/minim/git/refs{/sha}","trees_url":"https://api.github.com/repos/refractproject/minim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/refractproject/minim/statuses/{sha}","languages_url":"https://api.github.com/repos/refractproject/minim/languages","stargazers_url":"https://api.github.com/repos/refractproject/minim/stargazers","contributors_url":"https://api.github.com/repos/refractproject/minim/contributors","subscribers_url":"https://api.github.com/repos/refractproject/minim/subscribers","subscription_url":"https://api.github.com/repos/refractproject/minim/subscription","commits_url":"https://api.github.com/repos/refractproject/minim/commits{/sha}","git_commits_url":"https://api.github.com/repos/refractproject/minim/git/commits{/sha}","comments_url":"https://api.github.com/repos/refractproject/minim/comments{/number}","issue_comment_url":"https://api.github.com/repos/refractproject/minim/issues/comments{/number}","contents_url":"https://api.github.com/repos/refractproject/minim/contents/{+path}","compare_url":"https://api.github.com/repos/refractproject/minim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/refractproject/minim/merges","archive_url":"https://api.github.com/repos/refractproject/minim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/refractproject/minim/downloads","issues_url":"https://api.github.com/repos/refractproject/minim/issues{/number}","pulls_url":"https://api.github.com/repos/refractproject/minim/pulls{/number}","milestones_url":"https://api.github.com/repos/refractproject/minim/milestones{/number}","notifications_url":"https://api.github.com/repos/refractproject/minim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/refractproject/minim/labels{/name}","releases_url":"https://api.github.com/repos/refractproject/minim/releases{/id}","created_at":"2015-01-25T07:12:23Z","updated_at":"2015-05-25T11:23:16Z","pushed_at":"2015-07-21T13:27:26Z","git_url":"git://github.com/refractproject/minim.git","ssh_url":"git@github.com:refractproject/minim.git","clone_url":"https://github.com/refractproject/minim.git","svn_url":"https://github.com/refractproject/minim","homepage":"","size":736,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":20,"forks":1,"open_issues":20,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/refractproject/minim/pulls/66"},"html":{"href":"https://github.com/refractproject/minim/pull/66"},"issue":{"href":"https://api.github.com/repos/refractproject/minim/issues/66"},"comments":{"href":"https://api.github.com/repos/refractproject/minim/issues/66/comments"},"review_comments":{"href":"https://api.github.com/repos/refractproject/minim/pulls/66/comments"},"review_comment":{"href":"https://api.github.com/repos/refractproject/minim/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/refractproject/minim/pulls/66/commits"},"statuses":{"href":"https://api.github.com/repos/refractproject/minim/statuses/c70510e4fb88cf633a239be8c6cd8620cee78cea"}}}}