{"action":"created","comment":{"url":"https://api.github.com/repos/AnansiPodcast/charlie/pulls/comments/82913090","pull_request_review_id":3787295,"id":82913090,"diff_hunk":"@@ -0,0 +1,98 @@\n+let instance = null\n+\n+class Queue {\n+\n+  constructor() {\n+    if(!instance){\n+      instance = this // eslint-disable-line consistent-this\n+      this.setup()\n+    }\n+    return instance\n+  }\n+\n+  setup() {\n+    this.tasks = []\n+    this.pendingCounter = {}\n+    this.ranCounter = {}\n+    this.running = false\n+  }\n+\n+  valid(task) {\n+    if(\n+      typeof task.run !== 'function' ||\n+      typeof task.error !== 'function' ||\n+      typeof task.done !== 'function'\n+    ) throw new Error('Task has an invalid object signature, methods required')","path":"src/queue.js","position":25,"original_position":25,"commit_id":"62c3073b608c0e0bf53e668be5ab7722fe2dcb22","original_commit_id":"62c3073b608c0e0bf53e668be5ab7722fe2dcb22","user":{"login":"sergiovilar","id":860636,"avatar_url":"https://avatars.githubusercontent.com/u/860636?v=3","gravatar_id":"","url":"https://api.github.com/users/sergiovilar","html_url":"https://github.com/sergiovilar","followers_url":"https://api.github.com/users/sergiovilar/followers","following_url":"https://api.github.com/users/sergiovilar/following{/other_user}","gists_url":"https://api.github.com/users/sergiovilar/gists{/gist_id}","starred_url":"https://api.github.com/users/sergiovilar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergiovilar/subscriptions","organizations_url":"https://api.github.com/users/sergiovilar/orgs","repos_url":"https://api.github.com/users/sergiovilar/repos","events_url":"https://api.github.com/users/sergiovilar/events{/privacy}","received_events_url":"https://api.github.com/users/sergiovilar/received_events","type":"User","site_admin":false},"body":"Agree with TypeError, but I desagree about returnig false in this case. This method not only serves the purpose but implements the principle of Duck Typing because in Javascript we can't use Interfares so any class that does not implement those methods sholud throw an error because we can't let the implementation throw the error every time this method is being used.","created_at":"2016-10-11T23:51:40Z","updated_at":"2016-10-11T23:51:40Z","html_url":"https://github.com/AnansiPodcast/charlie/pull/9#discussion_r82913090","pull_request_url":"https://api.github.com/repos/AnansiPodcast/charlie/pulls/9","_links":{"self":{"href":"https://api.github.com/repos/AnansiPodcast/charlie/pulls/comments/82913090"},"html":{"href":"https://github.com/AnansiPodcast/charlie/pull/9#discussion_r82913090"},"pull_request":{"href":"https://api.github.com/repos/AnansiPodcast/charlie/pulls/9"}}},"pull_request":{"url":"https://api.github.com/repos/AnansiPodcast/charlie/pulls/9","id":88918148,"html_url":"https://github.com/AnansiPodcast/charlie/pull/9","diff_url":"https://github.com/AnansiPodcast/charlie/pull/9.diff","patch_url":"https://github.com/AnansiPodcast/charlie/pull/9.patch","issue_url":"https://api.github.com/repos/AnansiPodcast/charlie/issues/9","number":9,"state":"open","locked":false,"title":"Core: Queue","user":{"login":"sergiovilar","id":860636,"avatar_url":"https://avatars.githubusercontent.com/u/860636?v=3","gravatar_id":"","url":"https://api.github.com/users/sergiovilar","html_url":"https://github.com/sergiovilar","followers_url":"https://api.github.com/users/sergiovilar/followers","following_url":"https://api.github.com/users/sergiovilar/following{/other_user}","gists_url":"https://api.github.com/users/sergiovilar/gists{/gist_id}","starred_url":"https://api.github.com/users/sergiovilar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergiovilar/subscriptions","organizations_url":"https://api.github.com/users/sergiovilar/orgs","repos_url":"https://api.github.com/users/sergiovilar/repos","events_url":"https://api.github.com/users/sergiovilar/events{/privacy}","received_events_url":"https://api.github.com/users/sergiovilar/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-10-11T21:51:54Z","updated_at":"2016-10-11T23:51:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f0c685da66ee8ebd44fceb7569af685436aba814","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/AnansiPodcast/charlie/pulls/9/commits","review_comments_url":"https://api.github.com/repos/AnansiPodcast/charlie/pulls/9/comments","review_comment_url":"https://api.github.com/repos/AnansiPodcast/charlie/pulls/comments{/number}","comments_url":"https://api.github.com/repos/AnansiPodcast/charlie/issues/9/comments","statuses_url":"https://api.github.com/repos/AnansiPodcast/charlie/statuses/62c3073b608c0e0bf53e668be5ab7722fe2dcb22","head":{"label":"AnansiPodcast:core-queue","ref":"core-queue","sha":"62c3073b608c0e0bf53e668be5ab7722fe2dcb22","user":{"login":"AnansiPodcast","id":19760405,"avatar_url":"https://avatars.githubusercontent.com/u/19760405?v=3","gravatar_id":"","url":"https://api.github.com/users/AnansiPodcast","html_url":"https://github.com/AnansiPodcast","followers_url":"https://api.github.com/users/AnansiPodcast/followers","following_url":"https://api.github.com/users/AnansiPodcast/following{/other_user}","gists_url":"https://api.github.com/users/AnansiPodcast/gists{/gist_id}","starred_url":"https://api.github.com/users/AnansiPodcast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AnansiPodcast/subscriptions","organizations_url":"https://api.github.com/users/AnansiPodcast/orgs","repos_url":"https://api.github.com/users/AnansiPodcast/repos","events_url":"https://api.github.com/users/AnansiPodcast/events{/privacy}","received_events_url":"https://api.github.com/users/AnansiPodcast/received_events","type":"Organization","site_admin":false},"repo":{"id":70432794,"name":"charlie","full_name":"AnansiPodcast/charlie","owner":{"login":"AnansiPodcast","id":19760405,"avatar_url":"https://avatars.githubusercontent.com/u/19760405?v=3","gravatar_id":"","url":"https://api.github.com/users/AnansiPodcast","html_url":"https://github.com/AnansiPodcast","followers_url":"https://api.github.com/users/AnansiPodcast/followers","following_url":"https://api.github.com/users/AnansiPodcast/following{/other_user}","gists_url":"https://api.github.com/users/AnansiPodcast/gists{/gist_id}","starred_url":"https://api.github.com/users/AnansiPodcast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AnansiPodcast/subscriptions","organizations_url":"https://api.github.com/users/AnansiPodcast/orgs","repos_url":"https://api.github.com/users/AnansiPodcast/repos","events_url":"https://api.github.com/users/AnansiPodcast/events{/privacy}","received_events_url":"https://api.github.com/users/AnansiPodcast/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AnansiPodcast/charlie","description":"Fetch, parse and handle Podcasts XMLs and Episodes","fork":false,"url":"https://api.github.com/repos/AnansiPodcast/charlie","forks_url":"https://api.github.com/repos/AnansiPodcast/charlie/forks","keys_url":"https://api.github.com/repos/AnansiPodcast/charlie/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AnansiPodcast/charlie/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AnansiPodcast/charlie/teams","hooks_url":"https://api.github.com/repos/AnansiPodcast/charlie/hooks","issue_events_url":"https://api.github.com/repos/AnansiPodcast/charlie/issues/events{/number}","events_url":"https://api.github.com/repos/AnansiPodcast/charlie/events","assignees_url":"https://api.github.com/repos/AnansiPodcast/charlie/assignees{/user}","branches_url":"https://api.github.com/repos/AnansiPodcast/charlie/branches{/branch}","tags_url":"https://api.github.com/repos/AnansiPodcast/charlie/tags","blobs_url":"https://api.github.com/repos/AnansiPodcast/charlie/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AnansiPodcast/charlie/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AnansiPodcast/charlie/git/refs{/sha}","trees_url":"https://api.github.com/repos/AnansiPodcast/charlie/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AnansiPodcast/charlie/statuses/{sha}","languages_url":"https://api.github.com/repos/AnansiPodcast/charlie/languages","stargazers_url":"https://api.github.com/repos/AnansiPodcast/charlie/stargazers","contributors_url":"https://api.github.com/repos/AnansiPodcast/charlie/contributors","subscribers_url":"https://api.github.com/repos/AnansiPodcast/charlie/subscribers","subscription_url":"https://api.github.com/repos/AnansiPodcast/charlie/subscription","commits_url":"https://api.github.com/repos/AnansiPodcast/charlie/commits{/sha}","git_commits_url":"https://api.github.com/repos/AnansiPodcast/charlie/git/commits{/sha}","comments_url":"https://api.github.com/repos/AnansiPodcast/charlie/comments{/number}","issue_comment_url":"https://api.github.com/repos/AnansiPodcast/charlie/issues/comments{/number}","contents_url":"https://api.github.com/repos/AnansiPodcast/charlie/contents/{+path}","compare_url":"https://api.github.com/repos/AnansiPodcast/charlie/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AnansiPodcast/charlie/merges","archive_url":"https://api.github.com/repos/AnansiPodcast/charlie/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AnansiPodcast/charlie/downloads","issues_url":"https://api.github.com/repos/AnansiPodcast/charlie/issues{/number}","pulls_url":"https://api.github.com/repos/AnansiPodcast/charlie/pulls{/number}","milestones_url":"https://api.github.com/repos/AnansiPodcast/charlie/milestones{/number}","notifications_url":"https://api.github.com/repos/AnansiPodcast/charlie/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AnansiPodcast/charlie/labels{/name}","releases_url":"https://api.github.com/repos/AnansiPodcast/charlie/releases{/id}","deployments_url":"https://api.github.com/repos/AnansiPodcast/charlie/deployments","created_at":"2016-10-09T21:57:13Z","updated_at":"2016-10-09T22:02:47Z","pushed_at":"2016-10-11T21:51:54Z","git_url":"git://github.com/AnansiPodcast/charlie.git","ssh_url":"git@github.com:AnansiPodcast/charlie.git","clone_url":"https://github.com/AnansiPodcast/charlie.git","svn_url":"https://github.com/AnansiPodcast/charlie","homepage":null,"size":13,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":7,"forks":0,"open_issues":7,"watchers":0,"default_branch":"master"}},"base":{"label":"AnansiPodcast:master","ref":"master","sha":"9de8d9012f738b8e6f783b8f545626375dfc08a1","user":{"login":"AnansiPodcast","id":19760405,"avatar_url":"https://avatars.githubusercontent.com/u/19760405?v=3","gravatar_id":"","url":"https://api.github.com/users/AnansiPodcast","html_url":"https://github.com/AnansiPodcast","followers_url":"https://api.github.com/users/AnansiPodcast/followers","following_url":"https://api.github.com/users/AnansiPodcast/following{/other_user}","gists_url":"https://api.github.com/users/AnansiPodcast/gists{/gist_id}","starred_url":"https://api.github.com/users/AnansiPodcast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AnansiPodcast/subscriptions","organizations_url":"https://api.github.com/users/AnansiPodcast/orgs","repos_url":"https://api.github.com/users/AnansiPodcast/repos","events_url":"https://api.github.com/users/AnansiPodcast/events{/privacy}","received_events_url":"https://api.github.com/users/AnansiPodcast/received_events","type":"Organization","site_admin":false},"repo":{"id":70432794,"name":"charlie","full_name":"AnansiPodcast/charlie","owner":{"login":"AnansiPodcast","id":19760405,"avatar_url":"https://avatars.githubusercontent.com/u/19760405?v=3","gravatar_id":"","url":"https://api.github.com/users/AnansiPodcast","html_url":"https://github.com/AnansiPodcast","followers_url":"https://api.github.com/users/AnansiPodcast/followers","following_url":"https://api.github.com/users/AnansiPodcast/following{/other_user}","gists_url":"https://api.github.com/users/AnansiPodcast/gists{/gist_id}","starred_url":"https://api.github.com/users/AnansiPodcast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AnansiPodcast/subscriptions","organizations_url":"https://api.github.com/users/AnansiPodcast/orgs","repos_url":"https://api.github.com/users/AnansiPodcast/repos","events_url":"https://api.github.com/users/AnansiPodcast/events{/privacy}","received_events_url":"https://api.github.com/users/AnansiPodcast/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AnansiPodcast/charlie","description":"Fetch, parse and handle Podcasts XMLs and Episodes","fork":false,"url":"https://api.github.com/repos/AnansiPodcast/charlie","forks_url":"https://api.github.com/repos/AnansiPodcast/charlie/forks","keys_url":"https://api.github.com/repos/AnansiPodcast/charlie/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AnansiPodcast/charlie/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AnansiPodcast/charlie/teams","hooks_url":"https://api.github.com/repos/AnansiPodcast/charlie/hooks","issue_events_url":"https://api.github.com/repos/AnansiPodcast/charlie/issues/events{/number}","events_url":"https://api.github.com/repos/AnansiPodcast/charlie/events","assignees_url":"https://api.github.com/repos/AnansiPodcast/charlie/assignees{/user}","branches_url":"https://api.github.com/repos/AnansiPodcast/charlie/branches{/branch}","tags_url":"https://api.github.com/repos/AnansiPodcast/charlie/tags","blobs_url":"https://api.github.com/repos/AnansiPodcast/charlie/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AnansiPodcast/charlie/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AnansiPodcast/charlie/git/refs{/sha}","trees_url":"https://api.github.com/repos/AnansiPodcast/charlie/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AnansiPodcast/charlie/statuses/{sha}","languages_url":"https://api.github.com/repos/AnansiPodcast/charlie/languages","stargazers_url":"https://api.github.com/repos/AnansiPodcast/charlie/stargazers","contributors_url":"https://api.github.com/repos/AnansiPodcast/charlie/contributors","subscribers_url":"https://api.github.com/repos/AnansiPodcast/charlie/subscribers","subscription_url":"https://api.github.com/repos/AnansiPodcast/charlie/subscription","commits_url":"https://api.github.com/repos/AnansiPodcast/charlie/commits{/sha}","git_commits_url":"https://api.github.com/repos/AnansiPodcast/charlie/git/commits{/sha}","comments_url":"https://api.github.com/repos/AnansiPodcast/charlie/comments{/number}","issue_comment_url":"https://api.github.com/repos/AnansiPodcast/charlie/issues/comments{/number}","contents_url":"https://api.github.com/repos/AnansiPodcast/charlie/contents/{+path}","compare_url":"https://api.github.com/repos/AnansiPodcast/charlie/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AnansiPodcast/charlie/merges","archive_url":"https://api.github.com/repos/AnansiPodcast/charlie/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AnansiPodcast/charlie/downloads","issues_url":"https://api.github.com/repos/AnansiPodcast/charlie/issues{/number}","pulls_url":"https://api.github.com/repos/AnansiPodcast/charlie/pulls{/number}","milestones_url":"https://api.github.com/repos/AnansiPodcast/charlie/milestones{/number}","notifications_url":"https://api.github.com/repos/AnansiPodcast/charlie/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AnansiPodcast/charlie/labels{/name}","releases_url":"https://api.github.com/repos/AnansiPodcast/charlie/releases{/id}","deployments_url":"https://api.github.com/repos/AnansiPodcast/charlie/deployments","created_at":"2016-10-09T21:57:13Z","updated_at":"2016-10-09T22:02:47Z","pushed_at":"2016-10-11T21:51:54Z","git_url":"git://github.com/AnansiPodcast/charlie.git","ssh_url":"git@github.com:AnansiPodcast/charlie.git","clone_url":"https://github.com/AnansiPodcast/charlie.git","svn_url":"https://github.com/AnansiPodcast/charlie","homepage":null,"size":13,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":7,"forks":0,"open_issues":7,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/AnansiPodcast/charlie/pulls/9"},"html":{"href":"https://github.com/AnansiPodcast/charlie/pull/9"},"issue":{"href":"https://api.github.com/repos/AnansiPodcast/charlie/issues/9"},"comments":{"href":"https://api.github.com/repos/AnansiPodcast/charlie/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/AnansiPodcast/charlie/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/AnansiPodcast/charlie/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/AnansiPodcast/charlie/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/AnansiPodcast/charlie/statuses/62c3073b608c0e0bf53e668be5ab7722fe2dcb22"}}}}
{"actor":{"display_login":"sergiovilar"}}