GitHub PullRequestReviewCommentEvent at 2014-06-24 17:18:00
Repository: async-ext
Actor: jonahkagan
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/Clever/async-ext/pulls/comments/14141997","id":14141997,"diff_hunk":"@@ -91,6 +91,24 @@ init_db (err, connr3) ->\n # conn1 is conn2 is conn3\n ```\n \n+### async.if_true(condition, truthy, falsy, next)\n+\n+Takes a condition, two functions, and a callback. If the condition evaluates to true, truthy will be called, else falsy will be. Both will have next as a callback. This allows you to define the callback with the functions instead of before, improving readability.\n+\n+```coffeescript\n+# without async.if_true\n+cb = (output) -> console.log output\n+if some_cond\n+  truthy val, cb\n+else\n+  falsy val, cb\n+# with async.if_true\n+async.if_true some_cond,\n+  (next) -> truthy(val, next),\n+  (next) -> falsy(val, next),\n+  (output) -> console.log output","path":"README.md","position":19,"original_position":19,"commit_id":"858617818bc59989ab510f7f97ec709c685d1f44","original_commit_id":"858617818bc59989ab510f7f97ec709c685d1f44","user":{"login":"jonahkagan","id":530106,"avatar_url":"https://avatars.githubusercontent.com/u/530106?","gravatar_id":"5c47e5af415733c704159cbbd5bf91dd","url":"https://api.github.com/users/jonahkagan","html_url":"https://github.com/jonahkagan","followers_url":"https://api.github.com/users/jonahkagan/followers","following_url":"https://api.github.com/users/jonahkagan/following{/other_user}","gists_url":"https://api.github.com/users/jonahkagan/gists{/gist_id}","starred_url":"https://api.github.com/users/jonahkagan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonahkagan/subscriptions","organizations_url":"https://api.github.com/users/jonahkagan/orgs","repos_url":"https://api.github.com/users/jonahkagan/repos","events_url":"https://api.github.com/users/jonahkagan/events{/privacy}","received_events_url":"https://api.github.com/users/jonahkagan/received_events","type":"User","site_admin":false},"body":"this can be reduced to\r\n\r\n```coffee\r\nasync.if_true some_cond, truthy, falsy, (output) ->\r\n  console.log output\r\n```","created_at":"2014-06-24T17:18:00Z","updated_at":"2014-06-24T17:18:00Z","html_url":"https://github.com/Clever/async-ext/pull/4#discussion_r14141997","pull_request_url":"https://api.github.com/repos/Clever/async-ext/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/Clever/async-ext/pulls/comments/14141997"},"html":{"href":"https://github.com/Clever/async-ext/pull/4#discussion_r14141997"},"pull_request":{"href":"https://api.github.com/repos/Clever/async-ext/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/Clever/async-ext/pulls/4","id":17490110,"html_url":"https://github.com/Clever/async-ext/pull/4","diff_url":"https://github.com/Clever/async-ext/pull/4.diff","patch_url":"https://github.com/Clever/async-ext/pull/4.patch","issue_url":"https://api.github.com/repos/Clever/async-ext/issues/4","number":4,"state":"open","title":"Add if flow","user":{"login":"Christopher-Bradshaw","id":3906618,"avatar_url":"https://avatars.githubusercontent.com/u/3906618?","gravatar_id":null,"url":"https://api.github.com/users/Christopher-Bradshaw","html_url":"https://github.com/Christopher-Bradshaw","followers_url":"https://api.github.com/users/Christopher-Bradshaw/followers","following_url":"https://api.github.com/users/Christopher-Bradshaw/following{/other_user}","gists_url":"https://api.github.com/users/Christopher-Bradshaw/gists{/gist_id}","starred_url":"https://api.github.com/users/Christopher-Bradshaw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Christopher-Bradshaw/subscriptions","organizations_url":"https://api.github.com/users/Christopher-Bradshaw/orgs","repos_url":"https://api.github.com/users/Christopher-Bradshaw/repos","events_url":"https://api.github.com/users/Christopher-Bradshaw/events{/privacy}","received_events_url":"https://api.github.com/users/Christopher-Bradshaw/received_events","type":"User","site_admin":false},"body":"Adds something similar to what is discussed here http://joseoncode.com/2012/06/24/messing-with-cps-in-js/ and what we talked about https://github.com/Clever/clever-common/pull/68\r\n\r\nAllows us to write that code to https://github.com/Clever/clever-common/pull/69","created_at":"2014-06-23T18:19:14Z","updated_at":"2014-06-24T17:18:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ea8e3bc6f98c0412677397e68a1496ce7dc6c019","assignee":{"login":"jonahkagan","id":530106,"avatar_url":"https://avatars.githubusercontent.com/u/530106?","gravatar_id":"5c47e5af415733c704159cbbd5bf91dd","url":"https://api.github.com/users/jonahkagan","html_url":"https://github.com/jonahkagan","followers_url":"https://api.github.com/users/jonahkagan/followers","following_url":"https://api.github.com/users/jonahkagan/following{/other_user}","gists_url":"https://api.github.com/users/jonahkagan/gists{/gist_id}","starred_url":"https://api.github.com/users/jonahkagan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonahkagan/subscriptions","organizations_url":"https://api.github.com/users/jonahkagan/orgs","repos_url":"https://api.github.com/users/jonahkagan/repos","events_url":"https://api.github.com/users/jonahkagan/events{/privacy}","received_events_url":"https://api.github.com/users/jonahkagan/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/Clever/async-ext/pulls/4/commits","review_comments_url":"https://api.github.com/repos/Clever/async-ext/pulls/4/comments","review_comment_url":"https://api.github.com/repos/Clever/async-ext/pulls/comments/{number}","comments_url":"https://api.github.com/repos/Clever/async-ext/issues/4/comments","statuses_url":"https://api.github.com/repos/Clever/async-ext/statuses/858617818bc59989ab510f7f97ec709c685d1f44","head":{"label":"Clever:add-if-flow","ref":"add-if-flow","sha":"858617818bc59989ab510f7f97ec709c685d1f44","user":{"login":"Clever","id":1885509,"avatar_url":"https://avatars.githubusercontent.com/u/1885509?","gravatar_id":"2228b051cd524ceadfd5f9b59fdaad78","url":"https://api.github.com/users/Clever","html_url":"https://github.com/Clever","followers_url":"https://api.github.com/users/Clever/followers","following_url":"https://api.github.com/users/Clever/following{/other_user}","gists_url":"https://api.github.com/users/Clever/gists{/gist_id}","starred_url":"https://api.github.com/users/Clever/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Clever/subscriptions","organizations_url":"https://api.github.com/users/Clever/orgs","repos_url":"https://api.github.com/users/Clever/repos","events_url":"https://api.github.com/users/Clever/events{/privacy}","received_events_url":"https://api.github.com/users/Clever/received_events","type":"Organization","site_admin":false},"repo":{"id":13225953,"name":"async-ext","full_name":"Clever/async-ext","owner":{"login":"Clever","id":1885509,"avatar_url":"https://avatars.githubusercontent.com/u/1885509?","gravatar_id":"2228b051cd524ceadfd5f9b59fdaad78","url":"https://api.github.com/users/Clever","html_url":"https://github.com/Clever","followers_url":"https://api.github.com/users/Clever/followers","following_url":"https://api.github.com/users/Clever/following{/other_user}","gists_url":"https://api.github.com/users/Clever/gists{/gist_id}","starred_url":"https://api.github.com/users/Clever/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Clever/subscriptions","organizations_url":"https://api.github.com/users/Clever/orgs","repos_url":"https://api.github.com/users/Clever/repos","events_url":"https://api.github.com/users/Clever/events{/privacy}","received_events_url":"https://api.github.com/users/Clever/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Clever/async-ext","description":"Extensions to the Node.js async library","fork":false,"url":"https://api.github.com/repos/Clever/async-ext","forks_url":"https://api.github.com/repos/Clever/async-ext/forks","keys_url":"https://api.github.com/repos/Clever/async-ext/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Clever/async-ext/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Clever/async-ext/teams","hooks_url":"https://api.github.com/repos/Clever/async-ext/hooks","issue_events_url":"https://api.github.com/repos/Clever/async-ext/issues/events{/number}","events_url":"https://api.github.com/repos/Clever/async-ext/events","assignees_url":"https://api.github.com/repos/Clever/async-ext/assignees{/user}","branches_url":"https://api.github.com/repos/Clever/async-ext/branches{/branch}","tags_url":"https://api.github.com/repos/Clever/async-ext/tags","blobs_url":"https://api.github.com/repos/Clever/async-ext/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Clever/async-ext/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Clever/async-ext/git/refs{/sha}","trees_url":"https://api.github.com/repos/Clever/async-ext/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Clever/async-ext/statuses/{sha}","languages_url":"https://api.github.com/repos/Clever/async-ext/languages","stargazers_url":"https://api.github.com/repos/Clever/async-ext/stargazers","contributors_url":"https://api.github.com/repos/Clever/async-ext/contributors","subscribers_url":"https://api.github.com/repos/Clever/async-ext/subscribers","subscription_url":"https://api.github.com/repos/Clever/async-ext/subscription","commits_url":"https://api.github.com/repos/Clever/async-ext/commits{/sha}","git_commits_url":"https://api.github.com/repos/Clever/async-ext/git/commits{/sha}","comments_url":"https://api.github.com/repos/Clever/async-ext/comments{/number}","issue_comment_url":"https://api.github.com/repos/Clever/async-ext/issues/comments/{number}","contents_url":"https://api.github.com/repos/Clever/async-ext/contents/{+path}","compare_url":"https://api.github.com/repos/Clever/async-ext/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Clever/async-ext/merges","archive_url":"https://api.github.com/repos/Clever/async-ext/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Clever/async-ext/downloads","issues_url":"https://api.github.com/repos/Clever/async-ext/issues{/number}","pulls_url":"https://api.github.com/repos/Clever/async-ext/pulls{/number}","milestones_url":"https://api.github.com/repos/Clever/async-ext/milestones{/number}","notifications_url":"https://api.github.com/repos/Clever/async-ext/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Clever/async-ext/labels{/name}","releases_url":"https://api.github.com/repos/Clever/async-ext/releases{/id}","created_at":"2013-09-30T20:08:19Z","updated_at":"2014-06-24T17:14:41Z","pushed_at":"2014-06-24T17:14:41Z","git_url":"git://github.com/Clever/async-ext.git","ssh_url":"git@github.com:Clever/async-ext.git","clone_url":"https://github.com/Clever/async-ext.git","svn_url":"https://github.com/Clever/async-ext","homepage":null,"size":348,"stargazers_count":0,"watchers_count":0,"language":"CoffeeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"Clever:master","ref":"master","sha":"35e8b1b248e4463994c3066d3037efa8b9d6b4ae","user":{"login":"Clever","id":1885509,"avatar_url":"https://avatars.githubusercontent.com/u/1885509?","gravatar_id":"2228b051cd524ceadfd5f9b59fdaad78","url":"https://api.github.com/users/Clever","html_url":"https://github.com/Clever","followers_url":"https://api.github.com/users/Clever/followers","following_url":"https://api.github.com/users/Clever/following{/other_user}","gists_url":"https://api.github.com/users/Clever/gists{/gist_id}","starred_url":"https://api.github.com/users/Clever/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Clever/subscriptions","organizations_url":"https://api.github.com/users/Clever/orgs","repos_url":"https://api.github.com/users/Clever/repos","events_url":"https://api.github.com/users/Clever/events{/privacy}","received_events_url":"https://api.github.com/users/Clever/received_events","type":"Organization","site_admin":false},"repo":{"id":13225953,"name":"async-ext","full_name":"Clever/async-ext","owner":{"login":"Clever","id":1885509,"avatar_url":"https://avatars.githubusercontent.com/u/1885509?","gravatar_id":"2228b051cd524ceadfd5f9b59fdaad78","url":"https://api.github.com/users/Clever","html_url":"https://github.com/Clever","followers_url":"https://api.github.com/users/Clever/followers","following_url":"https://api.github.com/users/Clever/following{/other_user}","gists_url":"https://api.github.com/users/Clever/gists{/gist_id}","starred_url":"https://api.github.com/users/Clever/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Clever/subscriptions","organizations_url":"https://api.github.com/users/Clever/orgs","repos_url":"https://api.github.com/users/Clever/repos","events_url":"https://api.github.com/users/Clever/events{/privacy}","received_events_url":"https://api.github.com/users/Clever/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Clever/async-ext","description":"Extensions to the Node.js async library","fork":false,"url":"https://api.github.com/repos/Clever/async-ext","forks_url":"https://api.github.com/repos/Clever/async-ext/forks","keys_url":"https://api.github.com/repos/Clever/async-ext/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Clever/async-ext/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Clever/async-ext/teams","hooks_url":"https://api.github.com/repos/Clever/async-ext/hooks","issue_events_url":"https://api.github.com/repos/Clever/async-ext/issues/events{/number}","events_url":"https://api.github.com/repos/Clever/async-ext/events","assignees_url":"https://api.github.com/repos/Clever/async-ext/assignees{/user}","branches_url":"https://api.github.com/repos/Clever/async-ext/branches{/branch}","tags_url":"https://api.github.com/repos/Clever/async-ext/tags","blobs_url":"https://api.github.com/repos/Clever/async-ext/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Clever/async-ext/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Clever/async-ext/git/refs{/sha}","trees_url":"https://api.github.com/repos/Clever/async-ext/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Clever/async-ext/statuses/{sha}","languages_url":"https://api.github.com/repos/Clever/async-ext/languages","stargazers_url":"https://api.github.com/repos/Clever/async-ext/stargazers","contributors_url":"https://api.github.com/repos/Clever/async-ext/contributors","subscribers_url":"https://api.github.com/repos/Clever/async-ext/subscribers","subscription_url":"https://api.github.com/repos/Clever/async-ext/subscription","commits_url":"https://api.github.com/repos/Clever/async-ext/commits{/sha}","git_commits_url":"https://api.github.com/repos/Clever/async-ext/git/commits{/sha}","comments_url":"https://api.github.com/repos/Clever/async-ext/comments{/number}","issue_comment_url":"https://api.github.com/repos/Clever/async-ext/issues/comments/{number}","contents_url":"https://api.github.com/repos/Clever/async-ext/contents/{+path}","compare_url":"https://api.github.com/repos/Clever/async-ext/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Clever/async-ext/merges","archive_url":"https://api.github.com/repos/Clever/async-ext/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Clever/async-ext/downloads","issues_url":"https://api.github.com/repos/Clever/async-ext/issues{/number}","pulls_url":"https://api.github.com/repos/Clever/async-ext/pulls{/number}","milestones_url":"https://api.github.com/repos/Clever/async-ext/milestones{/number}","notifications_url":"https://api.github.com/repos/Clever/async-ext/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Clever/async-ext/labels{/name}","releases_url":"https://api.github.com/repos/Clever/async-ext/releases{/id}","created_at":"2013-09-30T20:08:19Z","updated_at":"2014-06-24T17:14:41Z","pushed_at":"2014-06-24T17:14:41Z","git_url":"git://github.com/Clever/async-ext.git","ssh_url":"git@github.com:Clever/async-ext.git","clone_url":"https://github.com/Clever/async-ext.git","svn_url":"https://github.com/Clever/async-ext","homepage":null,"size":348,"stargazers_count":0,"watchers_count":0,"language":"CoffeeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Clever/async-ext/pulls/4"},"html":{"href":"https://github.com/Clever/async-ext/pull/4"},"issue":{"href":"https://api.github.com/repos/Clever/async-ext/issues/4"},"comments":{"href":"https://api.github.com/repos/Clever/async-ext/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/Clever/async-ext/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/Clever/async-ext/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/Clever/async-ext/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/Clever/async-ext/statuses/858617818bc59989ab510f7f97ec709c685d1f44"}}}}