{"action":"created","issue":{"url":"https://api.github.com/repos/keystonejs/keystone-utils/issues/21","labels_url":"https://api.github.com/repos/keystonejs/keystone-utils/issues/21/labels{/name}","comments_url":"https://api.github.com/repos/keystonejs/keystone-utils/issues/21/comments","events_url":"https://api.github.com/repos/keystonejs/keystone-utils/issues/21/events","html_url":"https://github.com/keystonejs/keystone-utils/pull/21","id":120302619,"number":21,"title":"Implemented noop","user":{"login":"adnasa","id":462507,"avatar_url":"https://avatars.githubusercontent.com/u/462507?v=3","gravatar_id":"","url":"https://api.github.com/users/adnasa","html_url":"https://github.com/adnasa","followers_url":"https://api.github.com/users/adnasa/followers","following_url":"https://api.github.com/users/adnasa/following{/other_user}","gists_url":"https://api.github.com/users/adnasa/gists{/gist_id}","starred_url":"https://api.github.com/users/adnasa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adnasa/subscriptions","organizations_url":"https://api.github.com/users/adnasa/orgs","repos_url":"https://api.github.com/users/adnasa/repos","events_url":"https://api.github.com/users/adnasa/events{/privacy}","received_events_url":"https://api.github.com/users/adnasa/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-04T00:15:59Z","updated_at":"2015-12-04T00:45:25Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/keystonejs/keystone-utils/pulls/21","html_url":"https://github.com/keystonejs/keystone-utils/pull/21","diff_url":"https://github.com/keystonejs/keystone-utils/pull/21.diff","patch_url":"https://github.com/keystonejs/keystone-utils/pull/21.patch"},"body":"There are times I found the following repeatedly in __keystone__\r\n\r\n```\r\ncallback = callback || function() {};\r\n```\r\n\r\n---\r\n\r\nImplementing [noop](https://en.wikipedia.org/wiki/NOP) ensures consistency in writing code and it is much faster to read, rather than creating a new _anonymous_ every time.\r\n\r\nfiner usage:\r\n\r\n__old__\r\n```\r\ncallBatman(callback) {\r\n  callback = callback || noop;\r\n  // code\r\n}\r\n```\r\n\r\n__new__\r\n```\r\ncallBatman(callback = noop) {\r\n  // code\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/keystonejs/keystone-utils/issues/comments/161838814","html_url":"https://github.com/keystonejs/keystone-utils/pull/21#issuecomment-161838814","issue_url":"https://api.github.com/repos/keystonejs/keystone-utils/issues/21","id":161838814,"user":{"login":"adnasa","id":462507,"avatar_url":"https://avatars.githubusercontent.com/u/462507?v=3","gravatar_id":"","url":"https://api.github.com/users/adnasa","html_url":"https://github.com/adnasa","followers_url":"https://api.github.com/users/adnasa/followers","following_url":"https://api.github.com/users/adnasa/following{/other_user}","gists_url":"https://api.github.com/users/adnasa/gists{/gist_id}","starred_url":"https://api.github.com/users/adnasa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adnasa/subscriptions","organizations_url":"https://api.github.com/users/adnasa/orgs","repos_url":"https://api.github.com/users/adnasa/repos","events_url":"https://api.github.com/users/adnasa/events{/privacy}","received_events_url":"https://api.github.com/users/adnasa/received_events","type":"User","site_admin":false},"created_at":"2015-12-04T00:45:25Z","updated_at":"2015-12-04T00:45:25Z","body":"@ericelliott \r\nyeah... why not.\r\nMaybe I'm just tired right now, but since `index.js` is the main file here I'm wondering how the declaration would look like when you would want to import that into usage...\r\n"}}