{"action":"created","issue":{"url":"https://api.github.com/repos/gajus/youtube-player/issues/18","repository_url":"https://api.github.com/repos/gajus/youtube-player","labels_url":"https://api.github.com/repos/gajus/youtube-player/issues/18/labels{/name}","comments_url":"https://api.github.com/repos/gajus/youtube-player/issues/18/comments","events_url":"https://api.github.com/repos/gajus/youtube-player/issues/18/events","html_url":"https://github.com/gajus/youtube-player/pull/18","id":181974363,"number":18,"title":"Removing Bluebird and Lodash","user":{"login":"lukejacksonn","id":1457604,"avatar_url":"https://avatars.githubusercontent.com/u/1457604?v=3","gravatar_id":"","url":"https://api.github.com/users/lukejacksonn","html_url":"https://github.com/lukejacksonn","followers_url":"https://api.github.com/users/lukejacksonn/followers","following_url":"https://api.github.com/users/lukejacksonn/following{/other_user}","gists_url":"https://api.github.com/users/lukejacksonn/gists{/gist_id}","starred_url":"https://api.github.com/users/lukejacksonn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukejacksonn/subscriptions","organizations_url":"https://api.github.com/users/lukejacksonn/orgs","repos_url":"https://api.github.com/users/lukejacksonn/repos","events_url":"https://api.github.com/users/lukejacksonn/events{/privacy}","received_events_url":"https://api.github.com/users/lukejacksonn/received_events","type":"User","site_admin":false},"labels":[{"id":178609153,"url":"https://api.github.com/repos/gajus/youtube-player/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":13,"created_at":"2016-10-10T09:46:04Z","updated_at":"2016-11-06T20:13:11Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/gajus/youtube-player/pulls/18","html_url":"https://github.com/gajus/youtube-player/pull/18","diff_url":"https://github.com/gajus/youtube-player/pull/18.diff","patch_url":"https://github.com/gajus/youtube-player/pull/18.patch"},"body":"In response to https://github.com/gajus/youtube-player/issues/16\n\nIf you recommend that people polyfill promises themselves if needs be (with this https://github.com/stefanpenner/es6-promise most likely), then there is no need to bundle Bluebird in with youtube-player!\n\nAs @timpler has pointed out, there are considerable weight savings as well as bundle time savings to be made, see the webpack outputs before and after:\n\n```\nwebpack: bundle is now INVALID.\nHash: 21194fd6ad432f1e6bc1\nVersion: webpack 2.0.4-beta\nTime: 443ms\n                Asset    Size  Chunks             Chunk Names\n    youtube-player.js  307 kB       0  [emitted]  youtube-player\nyoutube-player.js.map  382 kB       0  [emitted]  youtube-player\nchunk    {0} youtube-player.js, youtube-player.js.map (youtube-player) 286 kB [rendered]\n   [39] ../dist/index.js 2.59 kB {0} [built]\n   [40] ../dist/YouTubePlayer.js 2.29 kB {0} [built]\n   [41] ../dist/eventNames.js 353 bytes {0} [built]\n   [42] ../dist/functionNames.js 1.25 kB {0} [built]\n   [43] ../dist/loadYouTubeIframeAPI.js 1.32 kB {0} [built]\n     + 129 hidden modules\nwebpack: bundle is now VALID.\n```\n\n```\nwebpack: bundle is now INVALID.\nHash: a8a38f9faf3e482b6973\nVersion: webpack 2.0.4-beta\nTime: 296ms\n                Asset    Size  Chunks             Chunk Names\n    youtube-player.js  115 kB       0  [emitted]  youtube-player\nyoutube-player.js.map  157 kB       0  [emitted]  youtube-player\nchunk    {0} youtube-player.js, youtube-player.js.map (youtube-player) 99.8 kB [rendered]\n   [39] ../dist/index.js 2.46 kB {0} [built]\n   [40] ../dist/YouTubePlayer.js 2.29 kB {0} [built]\n   [41] ../dist/eventNames.js 353 bytes {0} [built]\n   [42] ../dist/functionNames.js 1.25 kB {0} [built]\n   [43] ../dist/loadYouTubeIframeAPI.js 1.22 kB {0} [built]\n     + 126 hidden modules\nwebpack: bundle is now VALID.\n```\n\nIn the same vein, dropping Lodash offers even more savings, with very little change in code.. again see the before and after webpack output:\n\n```\nwebpack: bundle is now INVALID.\nHash: a8a38f9faf3e482b6973\nVersion: webpack 2.0.4-beta\nTime: 296ms\n                Asset    Size  Chunks             Chunk Names\n    youtube-player.js  115 kB       0  [emitted]  youtube-player\nyoutube-player.js.map  157 kB       0  [emitted]  youtube-player\nchunk    {0} youtube-player.js, youtube-player.js.map (youtube-player) 99.8 kB [rendered]\n   [39] ../dist/index.js 2.46 kB {0} [built]\n   [40] ../dist/YouTubePlayer.js 2.29 kB {0} [built]\n   [41] ../dist/eventNames.js 353 bytes {0} [built]\n   [42] ../dist/functionNames.js 1.25 kB {0} [built]\n   [43] ../dist/loadYouTubeIframeAPI.js 1.22 kB {0} [built]\n     + 126 hidden modules\nwebpack: bundle is now VALID.\n```\n\n```\nwebpack: bundle is now INVALID.\nHash: 0af88c24e09906d55964\nVersion: webpack 2.0.4-beta\nTime: 65ms\n                Asset     Size  Chunks             Chunk Names\n    youtube-player.js  13.3 kB       0  [emitted]  youtube-player\nyoutube-player.js.map  16.1 kB       0  [emitted]  youtube-player\nchunk    {0} youtube-player.js, youtube-player.js.map (youtube-player) 10.5 kB [rendered]\n   [39] ../dist/index.js 2.36 kB {0} [built]\n   [40] ../dist/YouTubePlayer.js 2.15 kB {0} [built]\n   [41] ../dist/eventNames.js 353 bytes {0} [built]\n   [42] ../dist/functionNames.js 1.25 kB {0} [built]\n   [43] ../dist/loadYouTubeIframeAPI.js 1.22 kB {0} [built]\n     + 3 hidden modules\nwebpack: bundle is now VALID.\n```\n"},"comment":{"url":"https://api.github.com/repos/gajus/youtube-player/issues/comments/258707110","html_url":"https://github.com/gajus/youtube-player/pull/18#issuecomment-258707110","issue_url":"https://api.github.com/repos/gajus/youtube-player/issues/18","id":258707110,"user":{"login":"jiayihu","id":10067273,"avatar_url":"https://avatars.githubusercontent.com/u/10067273?v=3","gravatar_id":"","url":"https://api.github.com/users/jiayihu","html_url":"https://github.com/jiayihu","followers_url":"https://api.github.com/users/jiayihu/followers","following_url":"https://api.github.com/users/jiayihu/following{/other_user}","gists_url":"https://api.github.com/users/jiayihu/gists{/gist_id}","starred_url":"https://api.github.com/users/jiayihu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jiayihu/subscriptions","organizations_url":"https://api.github.com/users/jiayihu/orgs","repos_url":"https://api.github.com/users/jiayihu/repos","events_url":"https://api.github.com/users/jiayihu/events{/privacy}","received_events_url":"https://api.github.com/users/jiayihu/received_events","type":"User","site_admin":false},"created_at":"2016-11-06T20:13:11Z","updated_at":"2016-11-06T20:13:11Z","body":"> It is, but I have no intention of removing it because there is no reason to.\r\n\r\nLodash is used essentially for `upperFirst`, `isString` and `forEach`. I think `typeof a === 'string'` and es5 native `Array.prototype.forEach` are good or even better alternatives.\r\nWhat about using https://www.npmjs.com/package/lodash.upperfirst or `import upperFirst from 'lodash/upperFirst` for the remaining `upperFirst`?"}}
{"actor":{"display_login":"jiayihu"}}