{"action":"created","issue":{"url":"https://api.github.com/repos/kentcdodds/webpack-validator/issues/58","repository_url":"https://api.github.com/repos/kentcdodds/webpack-validator","labels_url":"https://api.github.com/repos/kentcdodds/webpack-validator/issues/58/labels{/name}","comments_url":"https://api.github.com/repos/kentcdodds/webpack-validator/issues/58/comments","events_url":"https://api.github.com/repos/kentcdodds/webpack-validator/issues/58/events","html_url":"https://github.com/kentcdodds/webpack-validator/pull/58","id":143692779,"number":58,"title":"Experiment with refactoring stats","user":{"login":"jonathanewerner","id":3755413,"avatar_url":"https://avatars.githubusercontent.com/u/3755413?v=3","gravatar_id":"","url":"https://api.github.com/users/jonathanewerner","html_url":"https://github.com/jonathanewerner","followers_url":"https://api.github.com/users/jonathanewerner/followers","following_url":"https://api.github.com/users/jonathanewerner/following{/other_user}","gists_url":"https://api.github.com/users/jonathanewerner/gists{/gist_id}","starred_url":"https://api.github.com/users/jonathanewerner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonathanewerner/subscriptions","organizations_url":"https://api.github.com/users/jonathanewerner/orgs","repos_url":"https://api.github.com/users/jonathanewerner/repos","events_url":"https://api.github.com/users/jonathanewerner/events{/privacy}","received_events_url":"https://api.github.com/users/jonathanewerner/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-26T11:29:59Z","updated_at":"2016-03-26T11:31:57Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/kentcdodds/webpack-validator/pulls/58","html_url":"https://github.com/kentcdodds/webpack-validator/pull/58","diff_url":"https://github.com/kentcdodds/webpack-validator/pull/58.diff","patch_url":"https://github.com/kentcdodds/webpack-validator/pull/58.patch"},"body":"So i got an itch to play around with the @kentcdodds stats implementation from yesterday.\r\n Although I agree that reducing can lead to elegant code, something with the pattern of returning string constants bugs me, it seems such a \"non-standard\" way of doing things.\r\nSo, without having any serious intention of wanting to change this, i had to try out if there is a different way to express the inherent logic.\r\nI found that using lodash `find` is pretty nice for the case of multiple validators. Just have a look. We can totally throw this branch away if we don't like this, but maybe it's an inspiration or whatever. ;)\r\n\r\nI personally think that the cognitive load is decreased writing it like this, it feels more declarative whereas the CONTINUE / BREAK implementation feels a little imperative to me.\r\nI particulary like using the `undefined` return value of passing validators instead of explicitly returning `CONTINUE` every time.\r\n\r\nHave a nice saturday!\r\n"},"comment":{"url":"https://api.github.com/repos/kentcdodds/webpack-validator/issues/comments/201774650","html_url":"https://github.com/kentcdodds/webpack-validator/pull/58#issuecomment-201774650","issue_url":"https://api.github.com/repos/kentcdodds/webpack-validator/issues/58","id":201774650,"user":{"login":"codecov-io","id":8655789,"avatar_url":"https://avatars.githubusercontent.com/u/8655789?v=3","gravatar_id":"","url":"https://api.github.com/users/codecov-io","html_url":"https://github.com/codecov-io","followers_url":"https://api.github.com/users/codecov-io/followers","following_url":"https://api.github.com/users/codecov-io/following{/other_user}","gists_url":"https://api.github.com/users/codecov-io/gists{/gist_id}","starred_url":"https://api.github.com/users/codecov-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codecov-io/subscriptions","organizations_url":"https://api.github.com/users/codecov-io/orgs","repos_url":"https://api.github.com/users/codecov-io/repos","events_url":"https://api.github.com/users/codecov-io/events{/privacy}","received_events_url":"https://api.github.com/users/codecov-io/received_events","type":"User","site_admin":false},"created_at":"2016-03-26T11:31:57Z","updated_at":"2016-03-26T11:31:57Z","body":"## [Current coverage][1] is `100.00%`\n> Merging **#58** into **master** will not affect coverage as of [`f6e166e`][3]\n\n\n```diff\n@@            master     #58   diff @@\n======================================\n  Files           34      34       \n  Stmts          285     264    -21\n  Branches         0       0       \n  Methods          0       0       \n======================================\n- Hit            285     264    -21\n  Partial          0       0       \n  Missed           0       0       \n```\n\n> Review entire [Coverage Diff][4] as of [`f6e166e`][3]\n\n\n[1]: https://codecov.io/github/kentcdodds/webpack-validator?ref=f6e166e01eab192bb8d1aa1972cc9d46423f64be\n[2]: https://codecov.io/github/kentcdodds/webpack-validator/features/suggestions?ref=f6e166e01eab192bb8d1aa1972cc9d46423f64be\n[3]: https://codecov.io/github/kentcdodds/webpack-validator/commit/f6e166e01eab192bb8d1aa1972cc9d46423f64be\n[4]: https://codecov.io/github/kentcdodds/webpack-validator/compare/65111bb9c80fd5e9771ad9ec14bf02dd116275c5...f6e166e01eab192bb8d1aa1972cc9d46423f64be\n\n> Powered by [Codecov](https://codecov.io). Updated on successful CI builds."}}