GitHub PullRequestReviewCommentEvent at 2014-08-05 19:06:15
Repository: reflux
Actor: KyleAMathews
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/spoike/reflux/pulls/comments/15834289","id":15834289,"diff_hunk":"@@ -215,6 +215,93 @@ module.exports = {\n };\n \n },{}],3:[function(_dereq_,module,exports){\n+var createAction = _dereq_('./createAction');\n+\n+var slice = Array.prototype.slice;\n+\n+/**\n+ * Track a set of Actions and Stores. Use Reflux.all if you need to handle\n+ * data coming in parallel.\n+ *\n+ * @param {...Action|Store} listenables Actions and Stores that should be\n+ *  tracked.\n+ * @returns {Action} An action which tracks the provided Actions and Stores.\n+ *  The action will emit once all of the provided listenables have emitted at\n+ *  least once.\n+ */\n+module.exports = function(/* listenables... */) {\n+    var numberOfListenables = arguments.length,\n+        // create a new array of the expected size. The initial\n+        // values will be falsy, which is fine for us.\n+        // Once each item in the array is truthy, the callback can be called\n+        listenablesEmitted,\n+        // these arguments will be used to *apply* the action.\n+        args,\n+        // this action combines all the listenables\n+        action = createAction();\n+\n+    action.hasListener = function(listenable) {\n+        var i = 0, listener;\n+\n+        for (; i < args.length; ++i) {\n+            listener = args[i];\n+            if (listener === listener) {\n+                return true;\n+            }\n+            if (listener.hasListener && listener.hasListener(listenable)) {\n+                return true;\n+            }\n+        }\n+\n+        return false;\n+    };\n+\n+    reset();\n+\n+    for (var i = 0; i < numberOfListenables; i++) {\n+        arguments[i].listen(newListener(i), null);\n+    }\n+\n+    return action;\n+\n+    function reset() {\n+        listenablesEmitted = new Array(numberOfListenables);\n+        args = new Array(numberOfListenables);\n+    }\n+\n+    function newListener(i) {\n+        return function() {\n+            listenablesEmitted[i] = true;\n+            // Reflux users should not need to care about Array and arguments\n+            // differences. This makes sure that they get the expected Array\n+            // interface\n+            args[i] = slice.call(arguments);\n+            emitWhenAllListenablesEmitted();\n+        };\n+    }\n+\n+    function emitWhenAllListenablesEmitted() {\n+        if (didAllListenablesEmit()) {\n+            action.apply(action, args);\n+            reset();\n+        }\n+    }\n+\n+    function didAllListenablesEmit() {\n+        // reduce cannot be used because it only iterates over *present*\n+        // elements in the array. Initially the Array doesn't contain\n+        // elements. Fore this reason the usage of reduce would always indicate","path":"dist/reflux.js","position":79,"original_position":79,"commit_id":"6499dacc29218f8a453c750781b8474ef1769a0c","original_commit_id":"6499dacc29218f8a453c750781b8474ef1769a0c","user":{"login":"KyleAMathews","id":71047,"avatar_url":"https://avatars.githubusercontent.com/u/71047?v=2","gravatar_id":"e567aa8adbd2d49cd9990ea1ed19d4eb","url":"https://api.github.com/users/KyleAMathews","html_url":"https://github.com/KyleAMathews","followers_url":"https://api.github.com/users/KyleAMathews/followers","following_url":"https://api.github.com/users/KyleAMathews/following{/other_user}","gists_url":"https://api.github.com/users/KyleAMathews/gists{/gist_id}","starred_url":"https://api.github.com/users/KyleAMathews/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KyleAMathews/subscriptions","organizations_url":"https://api.github.com/users/KyleAMathews/orgs","repos_url":"https://api.github.com/users/KyleAMathews/repos","events_url":"https://api.github.com/users/KyleAMathews/events{/privacy}","received_events_url":"https://api.github.com/users/KyleAMathews/received_events","type":"User","site_admin":false},"body":"typo \"fore\"","created_at":"2014-08-05T19:06:15Z","updated_at":"2014-08-05T19:06:15Z","html_url":"https://github.com/spoike/reflux/pull/34#discussion_r15834289","pull_request_url":"https://api.github.com/repos/spoike/reflux/pulls/34","_links":{"self":{"href":"https://api.github.com/repos/spoike/reflux/pulls/comments/15834289"},"html":{"href":"https://github.com/spoike/reflux/pull/34#discussion_r15834289"},"pull_request":{"href":"https://api.github.com/repos/spoike/reflux/pulls/34"}}},"pull_request":{"url":"https://api.github.com/repos/spoike/reflux/pulls/34","id":19357017,"html_url":"https://github.com/spoike/reflux/pull/34","diff_url":"https://github.com/spoike/reflux/pull/34.diff","patch_url":"https://github.com/spoike/reflux/pull/34.patch","issue_url":"https://api.github.com/repos/spoike/reflux/issues/34","number":34,"state":"open","title":"Version 0.1.6","user":{"login":"spoike","id":9253,"avatar_url":"https://avatars.githubusercontent.com/u/9253?v=2","gravatar_id":"dc374f99f92956f128ef79df36d819e9","url":"https://api.github.com/users/spoike","html_url":"https://github.com/spoike","followers_url":"https://api.github.com/users/spoike/followers","following_url":"https://api.github.com/users/spoike/following{/other_user}","gists_url":"https://api.github.com/users/spoike/gists{/gist_id}","starred_url":"https://api.github.com/users/spoike/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spoike/subscriptions","organizations_url":"https://api.github.com/users/spoike/orgs","repos_url":"https://api.github.com/users/spoike/repos","events_url":"https://api.github.com/users/spoike/events{/privacy}","received_events_url":"https://api.github.com/users/spoike/received_events","type":"User","site_admin":false},"body":"Merging in #27 and #33. \r\nShould also fix #26.","created_at":"2014-08-05T17:39:58Z","updated_at":"2014-08-05T19:06:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"645ac7897797ad04942ca2468ac6f8fabf3ecced","assignee":null,"milestone":{"url":"https://api.github.com/repos/spoike/reflux/milestones/6","labels_url":"https://api.github.com/repos/spoike/reflux/milestones/6/labels","id":739545,"number":6,"title":"0.1.6","description":"With these features reflux will be in feature parity with [facebook/flux](https://github.com/facebook/flux).","creator":{"login":"spoike","id":9253,"avatar_url":"https://avatars.githubusercontent.com/u/9253?v=2","gravatar_id":"dc374f99f92956f128ef79df36d819e9","url":"https://api.github.com/users/spoike","html_url":"https://github.com/spoike","followers_url":"https://api.github.com/users/spoike/followers","following_url":"https://api.github.com/users/spoike/following{/other_user}","gists_url":"https://api.github.com/users/spoike/gists{/gist_id}","starred_url":"https://api.github.com/users/spoike/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spoike/subscriptions","organizations_url":"https://api.github.com/users/spoike/orgs","repos_url":"https://api.github.com/users/spoike/repos","events_url":"https://api.github.com/users/spoike/events{/privacy}","received_events_url":"https://api.github.com/users/spoike/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":2,"state":"open","created_at":"2014-08-01T10:16:58Z","updated_at":"2014-08-05T18:03:42Z","due_on":null},"commits_url":"https://api.github.com/repos/spoike/reflux/pulls/34/commits","review_comments_url":"https://api.github.com/repos/spoike/reflux/pulls/34/comments","review_comment_url":"https://api.github.com/repos/spoike/reflux/pulls/comments/{number}","comments_url":"https://api.github.com/repos/spoike/reflux/issues/34/comments","statuses_url":"https://api.github.com/repos/spoike/reflux/statuses/6499dacc29218f8a453c750781b8474ef1769a0c","head":{"label":"spoike:0.1.6","ref":"0.1.6","sha":"6499dacc29218f8a453c750781b8474ef1769a0c","user":{"login":"spoike","id":9253,"avatar_url":"https://avatars.githubusercontent.com/u/9253?v=2","gravatar_id":"dc374f99f92956f128ef79df36d819e9","url":"https://api.github.com/users/spoike","html_url":"https://github.com/spoike","followers_url":"https://api.github.com/users/spoike/followers","following_url":"https://api.github.com/users/spoike/following{/other_user}","gists_url":"https://api.github.com/users/spoike/gists{/gist_id}","starred_url":"https://api.github.com/users/spoike/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spoike/subscriptions","organizations_url":"https://api.github.com/users/spoike/orgs","repos_url":"https://api.github.com/users/spoike/repos","events_url":"https://api.github.com/users/spoike/events{/privacy}","received_events_url":"https://api.github.com/users/spoike/received_events","type":"User","site_admin":false},"repo":{"id":21397581,"name":"reflux","full_name":"spoike/reflux","owner":{"login":"spoike","id":9253,"avatar_url":"https://avatars.githubusercontent.com/u/9253?v=2","gravatar_id":"dc374f99f92956f128ef79df36d819e9","url":"https://api.github.com/users/spoike","html_url":"https://github.com/spoike","followers_url":"https://api.github.com/users/spoike/followers","following_url":"https://api.github.com/users/spoike/following{/other_user}","gists_url":"https://api.github.com/users/spoike/gists{/gist_id}","starred_url":"https://api.github.com/users/spoike/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spoike/subscriptions","organizations_url":"https://api.github.com/users/spoike/orgs","repos_url":"https://api.github.com/users/spoike/repos","events_url":"https://api.github.com/users/spoike/events{/privacy}","received_events_url":"https://api.github.com/users/spoike/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/spoike/reflux","description":"A simple library for uni-directional dataflow application architecture inspired by ReactJS Flux","fork":false,"url":"https://api.github.com/repos/spoike/reflux","forks_url":"https://api.github.com/repos/spoike/reflux/forks","keys_url":"https://api.github.com/repos/spoike/reflux/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spoike/reflux/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spoike/reflux/teams","hooks_url":"https://api.github.com/repos/spoike/reflux/hooks","issue_events_url":"https://api.github.com/repos/spoike/reflux/issues/events{/number}","events_url":"https://api.github.com/repos/spoike/reflux/events","assignees_url":"https://api.github.com/repos/spoike/reflux/assignees{/user}","branches_url":"https://api.github.com/repos/spoike/reflux/branches{/branch}","tags_url":"https://api.github.com/repos/spoike/reflux/tags","blobs_url":"https://api.github.com/repos/spoike/reflux/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spoike/reflux/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spoike/reflux/git/refs{/sha}","trees_url":"https://api.github.com/repos/spoike/reflux/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spoike/reflux/statuses/{sha}","languages_url":"https://api.github.com/repos/spoike/reflux/languages","stargazers_url":"https://api.github.com/repos/spoike/reflux/stargazers","contributors_url":"https://api.github.com/repos/spoike/reflux/contributors","subscribers_url":"https://api.github.com/repos/spoike/reflux/subscribers","subscription_url":"https://api.github.com/repos/spoike/reflux/subscription","commits_url":"https://api.github.com/repos/spoike/reflux/commits{/sha}","git_commits_url":"https://api.github.com/repos/spoike/reflux/git/commits{/sha}","comments_url":"https://api.github.com/repos/spoike/reflux/comments{/number}","issue_comment_url":"https://api.github.com/repos/spoike/reflux/issues/comments/{number}","contents_url":"https://api.github.com/repos/spoike/reflux/contents/{+path}","compare_url":"https://api.github.com/repos/spoike/reflux/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spoike/reflux/merges","archive_url":"https://api.github.com/repos/spoike/reflux/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spoike/reflux/downloads","issues_url":"https://api.github.com/repos/spoike/reflux/issues{/number}","pulls_url":"https://api.github.com/repos/spoike/reflux/pulls{/number}","milestones_url":"https://api.github.com/repos/spoike/reflux/milestones{/number}","notifications_url":"https://api.github.com/repos/spoike/reflux/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spoike/reflux/labels{/name}","releases_url":"https://api.github.com/repos/spoike/reflux/releases{/id}","created_at":"2014-07-01T18:05:30Z","updated_at":"2014-08-05T11:38:13Z","pushed_at":"2014-08-05T17:57:46Z","git_url":"git://github.com/spoike/reflux.git","ssh_url":"git@github.com:spoike/reflux.git","clone_url":"https://github.com/spoike/reflux.git","svn_url":"https://github.com/spoike/reflux","homepage":null,"size":646,"stargazers_count":76,"watchers_count":76,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":2,"mirror_url":null,"open_issues_count":9,"forks":2,"open_issues":9,"watchers":76,"default_branch":"master"}},"base":{"label":"spoike:master","ref":"master","sha":"0fbd8e3b3bad04fd3c39e828bbdd6a3624c9aeea","user":{"login":"spoike","id":9253,"avatar_url":"https://avatars.githubusercontent.com/u/9253?v=2","gravatar_id":"dc374f99f92956f128ef79df36d819e9","url":"https://api.github.com/users/spoike","html_url":"https://github.com/spoike","followers_url":"https://api.github.com/users/spoike/followers","following_url":"https://api.github.com/users/spoike/following{/other_user}","gists_url":"https://api.github.com/users/spoike/gists{/gist_id}","starred_url":"https://api.github.com/users/spoike/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spoike/subscriptions","organizations_url":"https://api.github.com/users/spoike/orgs","repos_url":"https://api.github.com/users/spoike/repos","events_url":"https://api.github.com/users/spoike/events{/privacy}","received_events_url":"https://api.github.com/users/spoike/received_events","type":"User","site_admin":false},"repo":{"id":21397581,"name":"reflux","full_name":"spoike/reflux","owner":{"login":"spoike","id":9253,"avatar_url":"https://avatars.githubusercontent.com/u/9253?v=2","gravatar_id":"dc374f99f92956f128ef79df36d819e9","url":"https://api.github.com/users/spoike","html_url":"https://github.com/spoike","followers_url":"https://api.github.com/users/spoike/followers","following_url":"https://api.github.com/users/spoike/following{/other_user}","gists_url":"https://api.github.com/users/spoike/gists{/gist_id}","starred_url":"https://api.github.com/users/spoike/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spoike/subscriptions","organizations_url":"https://api.github.com/users/spoike/orgs","repos_url":"https://api.github.com/users/spoike/repos","events_url":"https://api.github.com/users/spoike/events{/privacy}","received_events_url":"https://api.github.com/users/spoike/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/spoike/reflux","description":"A simple library for uni-directional dataflow application architecture inspired by ReactJS Flux","fork":false,"url":"https://api.github.com/repos/spoike/reflux","forks_url":"https://api.github.com/repos/spoike/reflux/forks","keys_url":"https://api.github.com/repos/spoike/reflux/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spoike/reflux/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spoike/reflux/teams","hooks_url":"https://api.github.com/repos/spoike/reflux/hooks","issue_events_url":"https://api.github.com/repos/spoike/reflux/issues/events{/number}","events_url":"https://api.github.com/repos/spoike/reflux/events","assignees_url":"https://api.github.com/repos/spoike/reflux/assignees{/user}","branches_url":"https://api.github.com/repos/spoike/reflux/branches{/branch}","tags_url":"https://api.github.com/repos/spoike/reflux/tags","blobs_url":"https://api.github.com/repos/spoike/reflux/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spoike/reflux/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spoike/reflux/git/refs{/sha}","trees_url":"https://api.github.com/repos/spoike/reflux/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spoike/reflux/statuses/{sha}","languages_url":"https://api.github.com/repos/spoike/reflux/languages","stargazers_url":"https://api.github.com/repos/spoike/reflux/stargazers","contributors_url":"https://api.github.com/repos/spoike/reflux/contributors","subscribers_url":"https://api.github.com/repos/spoike/reflux/subscribers","subscription_url":"https://api.github.com/repos/spoike/reflux/subscription","commits_url":"https://api.github.com/repos/spoike/reflux/commits{/sha}","git_commits_url":"https://api.github.com/repos/spoike/reflux/git/commits{/sha}","comments_url":"https://api.github.com/repos/spoike/reflux/comments{/number}","issue_comment_url":"https://api.github.com/repos/spoike/reflux/issues/comments/{number}","contents_url":"https://api.github.com/repos/spoike/reflux/contents/{+path}","compare_url":"https://api.github.com/repos/spoike/reflux/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spoike/reflux/merges","archive_url":"https://api.github.com/repos/spoike/reflux/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spoike/reflux/downloads","issues_url":"https://api.github.com/repos/spoike/reflux/issues{/number}","pulls_url":"https://api.github.com/repos/spoike/reflux/pulls{/number}","milestones_url":"https://api.github.com/repos/spoike/reflux/milestones{/number}","notifications_url":"https://api.github.com/repos/spoike/reflux/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spoike/reflux/labels{/name}","releases_url":"https://api.github.com/repos/spoike/reflux/releases{/id}","created_at":"2014-07-01T18:05:30Z","updated_at":"2014-08-05T11:38:13Z","pushed_at":"2014-08-05T17:57:46Z","git_url":"git://github.com/spoike/reflux.git","ssh_url":"git@github.com:spoike/reflux.git","clone_url":"https://github.com/spoike/reflux.git","svn_url":"https://github.com/spoike/reflux","homepage":null,"size":646,"stargazers_count":76,"watchers_count":76,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":2,"mirror_url":null,"open_issues_count":9,"forks":2,"open_issues":9,"watchers":76,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/spoike/reflux/pulls/34"},"html":{"href":"https://github.com/spoike/reflux/pull/34"},"issue":{"href":"https://api.github.com/repos/spoike/reflux/issues/34"},"comments":{"href":"https://api.github.com/repos/spoike/reflux/issues/34/comments"},"review_comments":{"href":"https://api.github.com/repos/spoike/reflux/pulls/34/comments"},"review_comment":{"href":"https://api.github.com/repos/spoike/reflux/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/spoike/reflux/pulls/34/commits"},"statuses":{"href":"https://api.github.com/repos/spoike/reflux/statuses/6499dacc29218f8a453c750781b8474ef1769a0c"}}}}