{"action":"created","comment":{"url":"https://api.github.com/repos/umbrellajs/umbrella/pulls/comments/50615910","id":50615910,"diff_hunk":"@@ -0,0 +1,21 @@\n+/**\n+ * .data(name, value)\n+ *\n+ * Retrieve or set the data-* attributes of the first matched node\n+ * @param String name the data-* attribute to search\n+ * @param String value optional atribute to set\n+ * @return this|String\n+ */\n+// ATTR\n+// Return the fist node attribute\n+u.prototype.data = function(name, value) {\n+  if (typeof name === 'object') {\n+    new_name = {};\n+    for(var key in name) {\n+      new_key = 'data-' + key;\n+      new_name[new_key] = name[key];","path":"src/plugins/data/data.js","position":16,"original_position":16,"commit_id":"2d1665232f9671484f7a02fbaba918be0869704e","original_commit_id":"2d1665232f9671484f7a02fbaba918be0869704e","user":{"login":"franciscop","id":2801252,"avatar_url":"https://avatars.githubusercontent.com/u/2801252?v=3","gravatar_id":"","url":"https://api.github.com/users/franciscop","html_url":"https://github.com/franciscop","followers_url":"https://api.github.com/users/franciscop/followers","following_url":"https://api.github.com/users/franciscop/following{/other_user}","gists_url":"https://api.github.com/users/franciscop/gists{/gist_id}","starred_url":"https://api.github.com/users/franciscop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/franciscop/subscriptions","organizations_url":"https://api.github.com/users/franciscop/orgs","repos_url":"https://api.github.com/users/franciscop/repos","events_url":"https://api.github.com/users/franciscop/events{/privacy}","received_events_url":"https://api.github.com/users/franciscop/received_events","type":"User","site_admin":false},"body":"these two lines could be combined, avoiding having to create a new variable like this:\r\n\r\n```js\r\nnew_name['data-' + key] = name[key];\r\n```","created_at":"2016-01-23T04:54:51Z","updated_at":"2016-01-23T04:54:51Z","html_url":"https://github.com/umbrellajs/umbrella/pull/6#discussion_r50615910","pull_request_url":"https://api.github.com/repos/umbrellajs/umbrella/pulls/6","_links":{"self":{"href":"https://api.github.com/repos/umbrellajs/umbrella/pulls/comments/50615910"},"html":{"href":"https://github.com/umbrellajs/umbrella/pull/6#discussion_r50615910"},"pull_request":{"href":"https://api.github.com/repos/umbrellajs/umbrella/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/umbrellajs/umbrella/pulls/6","id":56936126,"html_url":"https://github.com/umbrellajs/umbrella/pull/6","diff_url":"https://github.com/umbrellajs/umbrella/pull/6.diff","patch_url":"https://github.com/umbrellajs/umbrella/pull/6.patch","issue_url":"https://api.github.com/repos/umbrellajs/umbrella/issues/6","number":6,"state":"open","locked":false,"title":"Implemented data(name, value)","user":{"login":"tr3intaydos","id":9795656,"avatar_url":"https://avatars.githubusercontent.com/u/9795656?v=3","gravatar_id":"","url":"https://api.github.com/users/tr3intaydos","html_url":"https://github.com/tr3intaydos","followers_url":"https://api.github.com/users/tr3intaydos/followers","following_url":"https://api.github.com/users/tr3intaydos/following{/other_user}","gists_url":"https://api.github.com/users/tr3intaydos/gists{/gist_id}","starred_url":"https://api.github.com/users/tr3intaydos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tr3intaydos/subscriptions","organizations_url":"https://api.github.com/users/tr3intaydos/orgs","repos_url":"https://api.github.com/users/tr3intaydos/repos","events_url":"https://api.github.com/users/tr3intaydos/events{/privacy}","received_events_url":"https://api.github.com/users/tr3intaydos/received_events","type":"User","site_admin":false},"body":"New feature, fixes #4.","created_at":"2016-01-22T20:16:04Z","updated_at":"2016-01-23T04:54:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7f240ae8c8ffbf10eb13066c743c02a6ce306886","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/umbrellajs/umbrella/pulls/6/commits","review_comments_url":"https://api.github.com/repos/umbrellajs/umbrella/pulls/6/comments","review_comment_url":"https://api.github.com/repos/umbrellajs/umbrella/pulls/comments{/number}","comments_url":"https://api.github.com/repos/umbrellajs/umbrella/issues/6/comments","statuses_url":"https://api.github.com/repos/umbrellajs/umbrella/statuses/2d1665232f9671484f7a02fbaba918be0869704e","head":{"label":"tr3intaydos:data-implementation","ref":"data-implementation","sha":"2d1665232f9671484f7a02fbaba918be0869704e","user":{"login":"tr3intaydos","id":9795656,"avatar_url":"https://avatars.githubusercontent.com/u/9795656?v=3","gravatar_id":"","url":"https://api.github.com/users/tr3intaydos","html_url":"https://github.com/tr3intaydos","followers_url":"https://api.github.com/users/tr3intaydos/followers","following_url":"https://api.github.com/users/tr3intaydos/following{/other_user}","gists_url":"https://api.github.com/users/tr3intaydos/gists{/gist_id}","starred_url":"https://api.github.com/users/tr3intaydos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tr3intaydos/subscriptions","organizations_url":"https://api.github.com/users/tr3intaydos/orgs","repos_url":"https://api.github.com/users/tr3intaydos/repos","events_url":"https://api.github.com/users/tr3intaydos/events{/privacy}","received_events_url":"https://api.github.com/users/tr3intaydos/received_events","type":"User","site_admin":false},"repo":{"id":50204458,"name":"umbrella","full_name":"tr3intaydos/umbrella","owner":{"login":"tr3intaydos","id":9795656,"avatar_url":"https://avatars.githubusercontent.com/u/9795656?v=3","gravatar_id":"","url":"https://api.github.com/users/tr3intaydos","html_url":"https://github.com/tr3intaydos","followers_url":"https://api.github.com/users/tr3intaydos/followers","following_url":"https://api.github.com/users/tr3intaydos/following{/other_user}","gists_url":"https://api.github.com/users/tr3intaydos/gists{/gist_id}","starred_url":"https://api.github.com/users/tr3intaydos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tr3intaydos/subscriptions","organizations_url":"https://api.github.com/users/tr3intaydos/orgs","repos_url":"https://api.github.com/users/tr3intaydos/repos","events_url":"https://api.github.com/users/tr3intaydos/events{/privacy}","received_events_url":"https://api.github.com/users/tr3intaydos/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tr3intaydos/umbrella","description":":umbrella: Lightweight and intuitive javascript library","fork":true,"url":"https://api.github.com/repos/tr3intaydos/umbrella","forks_url":"https://api.github.com/repos/tr3intaydos/umbrella/forks","keys_url":"https://api.github.com/repos/tr3intaydos/umbrella/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tr3intaydos/umbrella/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tr3intaydos/umbrella/teams","hooks_url":"https://api.github.com/repos/tr3intaydos/umbrella/hooks","issue_events_url":"https://api.github.com/repos/tr3intaydos/umbrella/issues/events{/number}","events_url":"https://api.github.com/repos/tr3intaydos/umbrella/events","assignees_url":"https://api.github.com/repos/tr3intaydos/umbrella/assignees{/user}","branches_url":"https://api.github.com/repos/tr3intaydos/umbrella/branches{/branch}","tags_url":"https://api.github.com/repos/tr3intaydos/umbrella/tags","blobs_url":"https://api.github.com/repos/tr3intaydos/umbrella/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tr3intaydos/umbrella/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tr3intaydos/umbrella/git/refs{/sha}","trees_url":"https://api.github.com/repos/tr3intaydos/umbrella/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tr3intaydos/umbrella/statuses/{sha}","languages_url":"https://api.github.com/repos/tr3intaydos/umbrella/languages","stargazers_url":"https://api.github.com/repos/tr3intaydos/umbrella/stargazers","contributors_url":"https://api.github.com/repos/tr3intaydos/umbrella/contributors","subscribers_url":"https://api.github.com/repos/tr3intaydos/umbrella/subscribers","subscription_url":"https://api.github.com/repos/tr3intaydos/umbrella/subscription","commits_url":"https://api.github.com/repos/tr3intaydos/umbrella/commits{/sha}","git_commits_url":"https://api.github.com/repos/tr3intaydos/umbrella/git/commits{/sha}","comments_url":"https://api.github.com/repos/tr3intaydos/umbrella/comments{/number}","issue_comment_url":"https://api.github.com/repos/tr3intaydos/umbrella/issues/comments{/number}","contents_url":"https://api.github.com/repos/tr3intaydos/umbrella/contents/{+path}","compare_url":"https://api.github.com/repos/tr3intaydos/umbrella/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tr3intaydos/umbrella/merges","archive_url":"https://api.github.com/repos/tr3intaydos/umbrella/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tr3intaydos/umbrella/downloads","issues_url":"https://api.github.com/repos/tr3intaydos/umbrella/issues{/number}","pulls_url":"https://api.github.com/repos/tr3intaydos/umbrella/pulls{/number}","milestones_url":"https://api.github.com/repos/tr3intaydos/umbrella/milestones{/number}","notifications_url":"https://api.github.com/repos/tr3intaydos/umbrella/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tr3intaydos/umbrella/labels{/name}","releases_url":"https://api.github.com/repos/tr3intaydos/umbrella/releases{/id}","deployments_url":"https://api.github.com/repos/tr3intaydos/umbrella/deployments","created_at":"2016-01-22T19:59:25Z","updated_at":"2016-01-22T19:59:26Z","pushed_at":"2016-01-22T20:14:27Z","git_url":"git://github.com/tr3intaydos/umbrella.git","ssh_url":"git@github.com:tr3intaydos/umbrella.git","clone_url":"https://github.com/tr3intaydos/umbrella.git","svn_url":"https://github.com/tr3intaydos/umbrella","homepage":"http://umbrellajs.com/","size":691,"stargazers_count":0,"watchers_count":0,"language":"HTML","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":"umbrellajs:master","ref":"master","sha":"4d9f34d16f72d3e71bb289c3105ecc09e702ad13","user":{"login":"umbrellajs","id":9341316,"avatar_url":"https://avatars.githubusercontent.com/u/9341316?v=3","gravatar_id":"","url":"https://api.github.com/users/umbrellajs","html_url":"https://github.com/umbrellajs","followers_url":"https://api.github.com/users/umbrellajs/followers","following_url":"https://api.github.com/users/umbrellajs/following{/other_user}","gists_url":"https://api.github.com/users/umbrellajs/gists{/gist_id}","starred_url":"https://api.github.com/users/umbrellajs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/umbrellajs/subscriptions","organizations_url":"https://api.github.com/users/umbrellajs/orgs","repos_url":"https://api.github.com/users/umbrellajs/repos","events_url":"https://api.github.com/users/umbrellajs/events{/privacy}","received_events_url":"https://api.github.com/users/umbrellajs/received_events","type":"Organization","site_admin":false},"repo":{"id":25541186,"name":"umbrella","full_name":"umbrellajs/umbrella","owner":{"login":"umbrellajs","id":9341316,"avatar_url":"https://avatars.githubusercontent.com/u/9341316?v=3","gravatar_id":"","url":"https://api.github.com/users/umbrellajs","html_url":"https://github.com/umbrellajs","followers_url":"https://api.github.com/users/umbrellajs/followers","following_url":"https://api.github.com/users/umbrellajs/following{/other_user}","gists_url":"https://api.github.com/users/umbrellajs/gists{/gist_id}","starred_url":"https://api.github.com/users/umbrellajs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/umbrellajs/subscriptions","organizations_url":"https://api.github.com/users/umbrellajs/orgs","repos_url":"https://api.github.com/users/umbrellajs/repos","events_url":"https://api.github.com/users/umbrellajs/events{/privacy}","received_events_url":"https://api.github.com/users/umbrellajs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/umbrellajs/umbrella","description":":umbrella: Lightweight and intuitive javascript library","fork":false,"url":"https://api.github.com/repos/umbrellajs/umbrella","forks_url":"https://api.github.com/repos/umbrellajs/umbrella/forks","keys_url":"https://api.github.com/repos/umbrellajs/umbrella/keys{/key_id}","collaborators_url":"https://api.github.com/repos/umbrellajs/umbrella/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/umbrellajs/umbrella/teams","hooks_url":"https://api.github.com/repos/umbrellajs/umbrella/hooks","issue_events_url":"https://api.github.com/repos/umbrellajs/umbrella/issues/events{/number}","events_url":"https://api.github.com/repos/umbrellajs/umbrella/events","assignees_url":"https://api.github.com/repos/umbrellajs/umbrella/assignees{/user}","branches_url":"https://api.github.com/repos/umbrellajs/umbrella/branches{/branch}","tags_url":"https://api.github.com/repos/umbrellajs/umbrella/tags","blobs_url":"https://api.github.com/repos/umbrellajs/umbrella/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/umbrellajs/umbrella/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/umbrellajs/umbrella/git/refs{/sha}","trees_url":"https://api.github.com/repos/umbrellajs/umbrella/git/trees{/sha}","statuses_url":"https://api.github.com/repos/umbrellajs/umbrella/statuses/{sha}","languages_url":"https://api.github.com/repos/umbrellajs/umbrella/languages","stargazers_url":"https://api.github.com/repos/umbrellajs/umbrella/stargazers","contributors_url":"https://api.github.com/repos/umbrellajs/umbrella/contributors","subscribers_url":"https://api.github.com/repos/umbrellajs/umbrella/subscribers","subscription_url":"https://api.github.com/repos/umbrellajs/umbrella/subscription","commits_url":"https://api.github.com/repos/umbrellajs/umbrella/commits{/sha}","git_commits_url":"https://api.github.com/repos/umbrellajs/umbrella/git/commits{/sha}","comments_url":"https://api.github.com/repos/umbrellajs/umbrella/comments{/number}","issue_comment_url":"https://api.github.com/repos/umbrellajs/umbrella/issues/comments{/number}","contents_url":"https://api.github.com/repos/umbrellajs/umbrella/contents/{+path}","compare_url":"https://api.github.com/repos/umbrellajs/umbrella/compare/{base}...{head}","merges_url":"https://api.github.com/repos/umbrellajs/umbrella/merges","archive_url":"https://api.github.com/repos/umbrellajs/umbrella/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/umbrellajs/umbrella/downloads","issues_url":"https://api.github.com/repos/umbrellajs/umbrella/issues{/number}","pulls_url":"https://api.github.com/repos/umbrellajs/umbrella/pulls{/number}","milestones_url":"https://api.github.com/repos/umbrellajs/umbrella/milestones{/number}","notifications_url":"https://api.github.com/repos/umbrellajs/umbrella/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/umbrellajs/umbrella/labels{/name}","releases_url":"https://api.github.com/repos/umbrellajs/umbrella/releases{/id}","deployments_url":"https://api.github.com/repos/umbrellajs/umbrella/deployments","created_at":"2014-10-21T19:19:27Z","updated_at":"2016-01-23T04:42:41Z","pushed_at":"2016-01-23T01:54:49Z","git_url":"git://github.com/umbrellajs/umbrella.git","ssh_url":"git@github.com:umbrellajs/umbrella.git","clone_url":"https://github.com/umbrellajs/umbrella.git","svn_url":"https://github.com/umbrellajs/umbrella","homepage":"http://umbrellajs.com/","size":684,"stargazers_count":94,"watchers_count":94,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":9,"forks":6,"open_issues":9,"watchers":94,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/umbrellajs/umbrella/pulls/6"},"html":{"href":"https://github.com/umbrellajs/umbrella/pull/6"},"issue":{"href":"https://api.github.com/repos/umbrellajs/umbrella/issues/6"},"comments":{"href":"https://api.github.com/repos/umbrellajs/umbrella/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/umbrellajs/umbrella/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/umbrellajs/umbrella/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/umbrellajs/umbrella/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/umbrellajs/umbrella/statuses/2d1665232f9671484f7a02fbaba918be0869704e"}}}}