{"action":"created","comment":{"url":"https://api.github.com/repos/videojs/video.js/pulls/comments/27682043","id":27682043,"diff_hunk":"@@ -359,19 +365,20 @@ vjs.Component.prototype.getChild = function(name){\n  * @return {vjs.Component} The child component (created by this process if a string was used)\n  * @suppress {accessControls|checkRegExp|checkTypes|checkVars|const|constantProperty|deprecated|duplicate|es5Strict|fileoverviewTags|globalThis|invalidCasts|missingProperties|nonStandardJsDocs|strictModuleDepCheck|undefinedNames|undefinedVars|unknownDefines|uselessCode|visibility}\n  */\n-vjs.Component.prototype.addChild = function(child, options){\n-  var component, componentClass, componentName;\n-\n-  // If child is a string, create new component with options\n+Component.prototype.addChild = function(child, options){\n+  let component, componentName;","path":"src/js/component.js","position":245,"original_position":245,"commit_id":"50fab66feaa025b96e26a237376e24a560f5b7b3","original_commit_id":"50fab66feaa025b96e26a237376e24a560f5b7b3","user":{"login":"gkatsev","id":535884,"avatar_url":"https://avatars.githubusercontent.com/u/535884?v=3","gravatar_id":"","url":"https://api.github.com/users/gkatsev","html_url":"https://github.com/gkatsev","followers_url":"https://api.github.com/users/gkatsev/followers","following_url":"https://api.github.com/users/gkatsev/following{/other_user}","gists_url":"https://api.github.com/users/gkatsev/gists{/gist_id}","starred_url":"https://api.github.com/users/gkatsev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gkatsev/subscriptions","organizations_url":"https://api.github.com/users/gkatsev/orgs","repos_url":"https://api.github.com/users/gkatsev/repos","events_url":"https://api.github.com/users/gkatsev/events{/privacy}","received_events_url":"https://api.github.com/users/gkatsev/received_events","type":"User","site_admin":false},"body":"we don't need `componentName` here if it is defined in the `if` and only used in the `if`.\r\n\r\nAlso, we should consider still using `var` for variables that are function scoped. But this is a style-guide type thing.","created_at":"2015-04-02T18:11:08Z","updated_at":"2015-04-02T18:11:08Z","html_url":"https://github.com/videojs/video.js/pull/1976#discussion_r27682043","pull_request_url":"https://api.github.com/repos/videojs/video.js/pulls/1976","_links":{"self":{"href":"https://api.github.com/repos/videojs/video.js/pulls/comments/27682043"},"html":{"href":"https://github.com/videojs/video.js/pull/1976#discussion_r27682043"},"pull_request":{"href":"https://api.github.com/repos/videojs/video.js/pulls/1976"}}},"pull_request":{"url":"https://api.github.com/repos/videojs/video.js/pulls/1976","id":31959614,"html_url":"https://github.com/videojs/video.js/pull/1976","diff_url":"https://github.com/videojs/video.js/pull/1976.diff","patch_url":"https://github.com/videojs/video.js/pull/1976.patch","issue_url":"https://api.github.com/repos/videojs/video.js/issues/1976","number":1976,"state":"open","locked":false,"title":"ES6ification","user":{"login":"mmcc","id":794988,"avatar_url":"https://avatars.githubusercontent.com/u/794988?v=3","gravatar_id":"","url":"https://api.github.com/users/mmcc","html_url":"https://github.com/mmcc","followers_url":"https://api.github.com/users/mmcc/followers","following_url":"https://api.github.com/users/mmcc/following{/other_user}","gists_url":"https://api.github.com/users/mmcc/gists{/gist_id}","starred_url":"https://api.github.com/users/mmcc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmcc/subscriptions","organizations_url":"https://api.github.com/users/mmcc/orgs","repos_url":"https://api.github.com/users/mmcc/repos","events_url":"https://api.github.com/users/mmcc/events{/privacy}","received_events_url":"https://api.github.com/users/mmcc/received_events","type":"User","site_admin":false},"body":"![buckle up](http://media.giphy.com/media/V9DNLIwtjZ2hO/giphy.gif)\r\n\r\nThis isn't ready to merge yet...not even a little. I currently have a hacky way I'm going about getting tests working (custom es6 build), so that needs to be cleaned up and then another cleanup pass (or two...or 10).\r\n\r\nI've purposefully kept this really light in terms of ES6 features. Once we've got this merged, I propose we take another pass at implementing a few more things that can be easy wins for readability, such as string interpolation and fat arrow functions. For this PR, I've only implemented `import`, `let`, and the occasional `const`. Because `let` and `const` are block scoped, I've moved almost all declarations to the point of assignment (where applicable).\r\n\r\nThere are some things such as VjsLib and VjsEvents that should be changed to just Lib and Events, and Utils should be merged with Lib.\r\n\r\nSo, if folks wouldn't mind taking a quick glance at 2,983 additions and 2,453 deletions across 66 files, that'd be wonderful. :thumbsup:\r\n\r\n---\r\nRelated: #1720","created_at":"2015-03-25T19:55:18Z","updated_at":"2015-04-02T18:11:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c1baf9f76c22768785dcf7e52b39d2c04b0ddb6a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/videojs/video.js/pulls/1976/commits","review_comments_url":"https://api.github.com/repos/videojs/video.js/pulls/1976/comments","review_comment_url":"https://api.github.com/repos/videojs/video.js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/videojs/video.js/issues/1976/comments","statuses_url":"https://api.github.com/repos/videojs/video.js/statuses/50fab66feaa025b96e26a237376e24a560f5b7b3","head":{"label":"mmcc:es6ification","ref":"es6ification","sha":"50fab66feaa025b96e26a237376e24a560f5b7b3","user":{"login":"mmcc","id":794988,"avatar_url":"https://avatars.githubusercontent.com/u/794988?v=3","gravatar_id":"","url":"https://api.github.com/users/mmcc","html_url":"https://github.com/mmcc","followers_url":"https://api.github.com/users/mmcc/followers","following_url":"https://api.github.com/users/mmcc/following{/other_user}","gists_url":"https://api.github.com/users/mmcc/gists{/gist_id}","starred_url":"https://api.github.com/users/mmcc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmcc/subscriptions","organizations_url":"https://api.github.com/users/mmcc/orgs","repos_url":"https://api.github.com/users/mmcc/repos","events_url":"https://api.github.com/users/mmcc/events{/privacy}","received_events_url":"https://api.github.com/users/mmcc/received_events","type":"User","site_admin":false},"repo":{"id":13422289,"name":"video.js","full_name":"mmcc/video.js","owner":{"login":"mmcc","id":794988,"avatar_url":"https://avatars.githubusercontent.com/u/794988?v=3","gravatar_id":"","url":"https://api.github.com/users/mmcc","html_url":"https://github.com/mmcc","followers_url":"https://api.github.com/users/mmcc/followers","following_url":"https://api.github.com/users/mmcc/following{/other_user}","gists_url":"https://api.github.com/users/mmcc/gists{/gist_id}","starred_url":"https://api.github.com/users/mmcc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmcc/subscriptions","organizations_url":"https://api.github.com/users/mmcc/orgs","repos_url":"https://api.github.com/users/mmcc/repos","events_url":"https://api.github.com/users/mmcc/events{/privacy}","received_events_url":"https://api.github.com/users/mmcc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mmcc/video.js","description":"Video.js - open source HTML5 & Flash video player","fork":true,"url":"https://api.github.com/repos/mmcc/video.js","forks_url":"https://api.github.com/repos/mmcc/video.js/forks","keys_url":"https://api.github.com/repos/mmcc/video.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mmcc/video.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mmcc/video.js/teams","hooks_url":"https://api.github.com/repos/mmcc/video.js/hooks","issue_events_url":"https://api.github.com/repos/mmcc/video.js/issues/events{/number}","events_url":"https://api.github.com/repos/mmcc/video.js/events","assignees_url":"https://api.github.com/repos/mmcc/video.js/assignees{/user}","branches_url":"https://api.github.com/repos/mmcc/video.js/branches{/branch}","tags_url":"https://api.github.com/repos/mmcc/video.js/tags","blobs_url":"https://api.github.com/repos/mmcc/video.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mmcc/video.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mmcc/video.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/mmcc/video.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mmcc/video.js/statuses/{sha}","languages_url":"https://api.github.com/repos/mmcc/video.js/languages","stargazers_url":"https://api.github.com/repos/mmcc/video.js/stargazers","contributors_url":"https://api.github.com/repos/mmcc/video.js/contributors","subscribers_url":"https://api.github.com/repos/mmcc/video.js/subscribers","subscription_url":"https://api.github.com/repos/mmcc/video.js/subscription","commits_url":"https://api.github.com/repos/mmcc/video.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/mmcc/video.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/mmcc/video.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/mmcc/video.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/mmcc/video.js/contents/{+path}","compare_url":"https://api.github.com/repos/mmcc/video.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mmcc/video.js/merges","archive_url":"https://api.github.com/repos/mmcc/video.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mmcc/video.js/downloads","issues_url":"https://api.github.com/repos/mmcc/video.js/issues{/number}","pulls_url":"https://api.github.com/repos/mmcc/video.js/pulls{/number}","milestones_url":"https://api.github.com/repos/mmcc/video.js/milestones{/number}","notifications_url":"https://api.github.com/repos/mmcc/video.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mmcc/video.js/labels{/name}","releases_url":"https://api.github.com/repos/mmcc/video.js/releases{/id}","created_at":"2013-10-08T18:43:18Z","updated_at":"2015-04-02T01:04:41Z","pushed_at":"2015-04-02T01:29:12Z","git_url":"git://github.com/mmcc/video.js.git","ssh_url":"git@github.com:mmcc/video.js.git","clone_url":"https://github.com/mmcc/video.js.git","svn_url":"https://github.com/mmcc/video.js","homepage":"www.videojs.com","size":14038,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":false,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"videojs:master","ref":"master","sha":"ed76c5b709c5eaba678bf71eea8bbf6652fc5227","user":{"login":"videojs","id":3287189,"avatar_url":"https://avatars.githubusercontent.com/u/3287189?v=3","gravatar_id":"","url":"https://api.github.com/users/videojs","html_url":"https://github.com/videojs","followers_url":"https://api.github.com/users/videojs/followers","following_url":"https://api.github.com/users/videojs/following{/other_user}","gists_url":"https://api.github.com/users/videojs/gists{/gist_id}","starred_url":"https://api.github.com/users/videojs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/videojs/subscriptions","organizations_url":"https://api.github.com/users/videojs/orgs","repos_url":"https://api.github.com/users/videojs/repos","events_url":"https://api.github.com/users/videojs/events{/privacy}","received_events_url":"https://api.github.com/users/videojs/received_events","type":"Organization","site_admin":false},"repo":{"id":667006,"name":"video.js","full_name":"videojs/video.js","owner":{"login":"videojs","id":3287189,"avatar_url":"https://avatars.githubusercontent.com/u/3287189?v=3","gravatar_id":"","url":"https://api.github.com/users/videojs","html_url":"https://github.com/videojs","followers_url":"https://api.github.com/users/videojs/followers","following_url":"https://api.github.com/users/videojs/following{/other_user}","gists_url":"https://api.github.com/users/videojs/gists{/gist_id}","starred_url":"https://api.github.com/users/videojs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/videojs/subscriptions","organizations_url":"https://api.github.com/users/videojs/orgs","repos_url":"https://api.github.com/users/videojs/repos","events_url":"https://api.github.com/users/videojs/events{/privacy}","received_events_url":"https://api.github.com/users/videojs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/videojs/video.js","description":"Video.js - open source HTML5 & Flash video player","fork":false,"url":"https://api.github.com/repos/videojs/video.js","forks_url":"https://api.github.com/repos/videojs/video.js/forks","keys_url":"https://api.github.com/repos/videojs/video.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/videojs/video.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/videojs/video.js/teams","hooks_url":"https://api.github.com/repos/videojs/video.js/hooks","issue_events_url":"https://api.github.com/repos/videojs/video.js/issues/events{/number}","events_url":"https://api.github.com/repos/videojs/video.js/events","assignees_url":"https://api.github.com/repos/videojs/video.js/assignees{/user}","branches_url":"https://api.github.com/repos/videojs/video.js/branches{/branch}","tags_url":"https://api.github.com/repos/videojs/video.js/tags","blobs_url":"https://api.github.com/repos/videojs/video.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/videojs/video.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/videojs/video.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/videojs/video.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/videojs/video.js/statuses/{sha}","languages_url":"https://api.github.com/repos/videojs/video.js/languages","stargazers_url":"https://api.github.com/repos/videojs/video.js/stargazers","contributors_url":"https://api.github.com/repos/videojs/video.js/contributors","subscribers_url":"https://api.github.com/repos/videojs/video.js/subscribers","subscription_url":"https://api.github.com/repos/videojs/video.js/subscription","commits_url":"https://api.github.com/repos/videojs/video.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/videojs/video.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/videojs/video.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/videojs/video.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/videojs/video.js/contents/{+path}","compare_url":"https://api.github.com/repos/videojs/video.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/videojs/video.js/merges","archive_url":"https://api.github.com/repos/videojs/video.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/videojs/video.js/downloads","issues_url":"https://api.github.com/repos/videojs/video.js/issues{/number}","pulls_url":"https://api.github.com/repos/videojs/video.js/pulls{/number}","milestones_url":"https://api.github.com/repos/videojs/video.js/milestones{/number}","notifications_url":"https://api.github.com/repos/videojs/video.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/videojs/video.js/labels{/name}","releases_url":"https://api.github.com/repos/videojs/video.js/releases{/id}","created_at":"2010-05-14T18:45:10Z","updated_at":"2015-04-02T16:04:48Z","pushed_at":"2015-04-02T16:04:47Z","git_url":"git://github.com/videojs/video.js.git","ssh_url":"git@github.com:videojs/video.js.git","clone_url":"https://github.com/videojs/video.js.git","svn_url":"https://github.com/videojs/video.js","homepage":"www.videojs.com","size":20813,"stargazers_count":8486,"watchers_count":8486,"language":"JavaScript","has_issues":true,"has_downloads":false,"has_wiki":true,"has_pages":true,"forks_count":2321,"mirror_url":null,"open_issues_count":167,"forks":2321,"open_issues":167,"watchers":8486,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/videojs/video.js/pulls/1976"},"html":{"href":"https://github.com/videojs/video.js/pull/1976"},"issue":{"href":"https://api.github.com/repos/videojs/video.js/issues/1976"},"comments":{"href":"https://api.github.com/repos/videojs/video.js/issues/1976/comments"},"review_comments":{"href":"https://api.github.com/repos/videojs/video.js/pulls/1976/comments"},"review_comment":{"href":"https://api.github.com/repos/videojs/video.js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/videojs/video.js/pulls/1976/commits"},"statuses":{"href":"https://api.github.com/repos/videojs/video.js/statuses/50fab66feaa025b96e26a237376e24a560f5b7b3"}}}}