{"action":"created","issue":{"url":"https://api.github.com/repos/Automattic/wp-calypso/issues/2028","labels_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/2028/labels{/name}","comments_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/2028/comments","events_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/2028/events","html_url":"https://github.com/Automattic/wp-calypso/pull/2028","id":124337426,"number":2028,"title":"Framework: Bundler loader: Refactor","user":{"login":"mcsf","id":150562,"avatar_url":"https://avatars.githubusercontent.com/u/150562?v=3","gravatar_id":"","url":"https://api.github.com/users/mcsf","html_url":"https://github.com/mcsf","followers_url":"https://api.github.com/users/mcsf/followers","following_url":"https://api.github.com/users/mcsf/following{/other_user}","gists_url":"https://api.github.com/users/mcsf/gists{/gist_id}","starred_url":"https://api.github.com/users/mcsf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcsf/subscriptions","organizations_url":"https://api.github.com/users/mcsf/orgs","repos_url":"https://api.github.com/users/mcsf/repos","events_url":"https://api.github.com/users/mcsf/events{/privacy}","received_events_url":"https://api.github.com/users/mcsf/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/Framework","name":"Framework","color":"006b75"},{"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/[Status]%20In%20Progress","name":"[Status] In Progress","color":"207de5"},{"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/[Status]%20Needs%20Review","name":"[Status] Needs Review","color":"fbca04"},{"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/[Type]%20Question","name":"[Type] Question","color":"cc317c"}],"state":"open","locked":false,"assignee":{"login":"mcsf","id":150562,"avatar_url":"https://avatars.githubusercontent.com/u/150562?v=3","gravatar_id":"","url":"https://api.github.com/users/mcsf","html_url":"https://github.com/mcsf","followers_url":"https://api.github.com/users/mcsf/followers","following_url":"https://api.github.com/users/mcsf/following{/other_user}","gists_url":"https://api.github.com/users/mcsf/gists{/gist_id}","starred_url":"https://api.github.com/users/mcsf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcsf/subscriptions","organizations_url":"https://api.github.com/users/mcsf/orgs","repos_url":"https://api.github.com/users/mcsf/repos","events_url":"https://api.github.com/users/mcsf/events{/privacy}","received_events_url":"https://api.github.com/users/mcsf/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2015-12-30T11:39:14Z","updated_at":"2015-12-30T15:37:43Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/2028","html_url":"https://github.com/Automattic/wp-calypso/pull/2028","diff_url":"https://github.com/Automattic/wp-calypso/pull/2028.diff","patch_url":"https://github.com/Automattic/wp-calypso/pull/2028.patch"},"body":"Depends on #1561\r\n\r\nThis PR aims to improve readability of `server/bundler/loader.js`, via clearer naming, new functions, and preferring map/reduce-chaining over stateful `forEach` iterations.\r\n\r\nAs code clarity is, to some extent, subjective, I welcome feedback on whether this is helpful."},"comment":{"url":"https://api.github.com/repos/Automattic/wp-calypso/issues/comments/168020757","html_url":"https://github.com/Automattic/wp-calypso/pull/2028#issuecomment-168020757","issue_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/2028","id":168020757,"user":{"login":"mcsf","id":150562,"avatar_url":"https://avatars.githubusercontent.com/u/150562?v=3","gravatar_id":"","url":"https://api.github.com/users/mcsf","html_url":"https://github.com/mcsf","followers_url":"https://api.github.com/users/mcsf/followers","following_url":"https://api.github.com/users/mcsf/following{/other_user}","gists_url":"https://api.github.com/users/mcsf/gists{/gist_id}","starred_url":"https://api.github.com/users/mcsf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcsf/subscriptions","organizations_url":"https://api.github.com/users/mcsf/orgs","repos_url":"https://api.github.com/users/mcsf/repos","events_url":"https://api.github.com/users/mcsf/events{/privacy}","received_events_url":"https://api.github.com/users/mcsf/received_events","type":"User","site_admin":false},"created_at":"2015-12-30T15:37:43Z","updated_at":"2015-12-30T15:37:43Z","body":"Since the `xs.map( f ).join( '' )` pattern is used quite often, would it be better to replace those instances with `mapToString( xs, f )`, where\r\n\r\n```js\r\nconst mapToString = ( xs, f ) =>\r\n  xs.reduce( ( acc, x ) => acc + f( x ), '' )\r\n```\r\n\r\n?"}}