{"action":"opened","number":1,"pull_request":{"url":"https://api.github.com/repos/afifshato/h8-p0-w5/pulls/1","id":198549392,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk4NTQ5Mzky","html_url":"https://github.com/afifshato/h8-p0-w5/pull/1","diff_url":"https://github.com/afifshato/h8-p0-w5/pull/1.diff","patch_url":"https://github.com/afifshato/h8-p0-w5/pull/1.patch","issue_url":"https://api.github.com/repos/afifshato/h8-p0-w5/issues/1","number":1,"state":"open","locked":false,"title":"meeleRangedGrouping.js","user":{"login":"afifshato","id":10976165,"node_id":"MDQ6VXNlcjEwOTc2MTY1","avatar_url":"https://avatars2.githubusercontent.com/u/10976165?v=4","gravatar_id":"","url":"https://api.github.com/users/afifshato","html_url":"https://github.com/afifshato","followers_url":"https://api.github.com/users/afifshato/followers","following_url":"https://api.github.com/users/afifshato/following{/other_user}","gists_url":"https://api.github.com/users/afifshato/gists{/gist_id}","starred_url":"https://api.github.com/users/afifshato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/afifshato/subscriptions","organizations_url":"https://api.github.com/users/afifshato/orgs","repos_url":"https://api.github.com/users/afifshato/repos","events_url":"https://api.github.com/users/afifshato/events{/privacy}","received_events_url":"https://api.github.com/users/afifshato/received_events","type":"User","site_admin":false},"body":"function meleeRangedGrouping (str) {\r\n  var result = []\r\n  var ranged = []\r\n  var melee = []\r\n  var strSplit = str.split(',')\r\n\r\n  if(str.length === 0){\r\n    return result\r\n  }\r\n  \r\n  for(var a = 0; a < strSplit.length; a++){\r\n      for(var b = 0; b < strSplit[a].length; b++){\r\n      if(strSplit[a][b] === '-' && strSplit[a][b+1] === 'R'){\r\n        ranged.push(strSplit[a].slice(0, b))\r\n      } else if(strSplit[a][b] === '-' && strSplit[a][b+1] === 'M'){\r\n        melee.push(strSplit[a].slice(0, b))\r\n      }\r\n    }\r\n  }\r\n  result.push(ranged, melee)\r\n  return result\r\n \r\n  \r\n  //let hasilSplit = hasil.split('-')\r\n  \r\n}\r\n\r\n// TEST CASE\r\n\r\nconsole.log(meleeRangedGrouping('Razor-Ranged,Invoker-Ranged,Meepo-Melee,Axe-Melee,Sniper-Ranged'));\r\n// [ ['Razor', 'Invoker', 'Sniper'], ['Meepo', 'Axe'] ]\r\n\r\nconsole.log(meleeRangedGrouping('Drow Ranger-Ranged,Chen-Ranged,Dazzle-Ranged,Io-Ranged'));\r\n// [ ['Drow Ranger', 'Chen', 'Dazzle', 'Io'], [] ]\r\n\r\nconsole.log(meleeRangedGrouping('')); // []","created_at":"2018-07-01T23:48:58Z","updated_at":"2018-07-01T23:48:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/afifshato/h8-p0-w5/pulls/1/commits","review_comments_url":"https://api.github.com/repos/afifshato/h8-p0-w5/pulls/1/comments","review_comment_url":"https://api.github.com/repos/afifshato/h8-p0-w5/pulls/comments{/number}","comments_url":"https://api.github.com/repos/afifshato/h8-p0-w5/issues/1/comments","statuses_url":"https://api.github.com/repos/afifshato/h8-p0-w5/statuses/238a275cc97cd7970a81cda6ce9f74c73a0ac418","head":{"label":"afifshato:master","ref":"master","sha":"238a275cc97cd7970a81cda6ce9f74c73a0ac418","user":{"login":"afifshato","id":10976165,"node_id":"MDQ6VXNlcjEwOTc2MTY1","avatar_url":"https://avatars2.githubusercontent.com/u/10976165?v=4","gravatar_id":"","url":"https://api.github.com/users/afifshato","html_url":"https://github.com/afifshato","followers_url":"https://api.github.com/users/afifshato/followers","following_url":"https://api.github.com/users/afifshato/following{/other_user}","gists_url":"https://api.github.com/users/afifshato/gists{/gist_id}","starred_url":"https://api.github.com/users/afifshato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/afifshato/subscriptions","organizations_url":"https://api.github.com/users/afifshato/orgs","repos_url":"https://api.github.com/users/afifshato/repos","events_url":"https://api.github.com/users/afifshato/events{/privacy}","received_events_url":"https://api.github.com/users/afifshato/received_events","type":"User","site_admin":false},"repo":{"id":139322131,"node_id":"MDEwOlJlcG9zaXRvcnkxMzkzMjIxMzE=","name":"h8-p0-w5","full_name":"afifshato/h8-p0-w5","owner":{"login":"afifshato","id":10976165,"node_id":"MDQ6VXNlcjEwOTc2MTY1","avatar_url":"https://avatars2.githubusercontent.com/u/10976165?v=4","gravatar_id":"","url":"https://api.github.com/users/afifshato","html_url":"https://github.com/afifshato","followers_url":"https://api.github.com/users/afifshato/followers","following_url":"https://api.github.com/users/afifshato/following{/other_user}","gists_url":"https://api.github.com/users/afifshato/gists{/gist_id}","starred_url":"https://api.github.com/users/afifshato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/afifshato/subscriptions","organizations_url":"https://api.github.com/users/afifshato/orgs","repos_url":"https://api.github.com/users/afifshato/repos","events_url":"https://api.github.com/users/afifshato/events{/privacy}","received_events_url":"https://api.github.com/users/afifshato/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/afifshato/h8-p0-w5","description":null,"fork":false,"url":"https://api.github.com/repos/afifshato/h8-p0-w5","forks_url":"https://api.github.com/repos/afifshato/h8-p0-w5/forks","keys_url":"https://api.github.com/repos/afifshato/h8-p0-w5/keys{/key_id}","collaborators_url":"https://api.github.com/repos/afifshato/h8-p0-w5/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/afifshato/h8-p0-w5/teams","hooks_url":"https://api.github.com/repos/afifshato/h8-p0-w5/hooks","issue_events_url":"https://api.github.com/repos/afifshato/h8-p0-w5/issues/events{/number}","events_url":"https://api.github.com/repos/afifshato/h8-p0-w5/events","assignees_url":"https://api.github.com/repos/afifshato/h8-p0-w5/assignees{/user}","branches_url":"https://api.github.com/repos/afifshato/h8-p0-w5/branches{/branch}","tags_url":"https://api.github.com/repos/afifshato/h8-p0-w5/tags","blobs_url":"https://api.github.com/repos/afifshato/h8-p0-w5/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/afifshato/h8-p0-w5/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/afifshato/h8-p0-w5/git/refs{/sha}","trees_url":"https://api.github.com/repos/afifshato/h8-p0-w5/git/trees{/sha}","statuses_url":"https://api.github.com/repos/afifshato/h8-p0-w5/statuses/{sha}","languages_url":"https://api.github.com/repos/afifshato/h8-p0-w5/languages","stargazers_url":"https://api.github.com/repos/afifshato/h8-p0-w5/stargazers","contributors_url":"https://api.github.com/repos/afifshato/h8-p0-w5/contributors","subscribers_url":"https://api.github.com/repos/afifshato/h8-p0-w5/subscribers","subscription_url":"https://api.github.com/repos/afifshato/h8-p0-w5/subscription","commits_url":"https://api.github.com/repos/afifshato/h8-p0-w5/commits{/sha}","git_commits_url":"https://api.github.com/repos/afifshato/h8-p0-w5/git/commits{/sha}","comments_url":"https://api.github.com/repos/afifshato/h8-p0-w5/comments{/number}","issue_comment_url":"https://api.github.com/repos/afifshato/h8-p0-w5/issues/comments{/number}","contents_url":"https://api.github.com/repos/afifshato/h8-p0-w5/contents/{+path}","compare_url":"https://api.github.com/repos/afifshato/h8-p0-w5/compare/{base}...{head}","merges_url":"https://api.github.com/repos/afifshato/h8-p0-w5/merges","archive_url":"https://api.github.com/repos/afifshato/h8-p0-w5/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/afifshato/h8-p0-w5/downloads","issues_url":"https://api.github.com/repos/afifshato/h8-p0-w5/issues{/number}","pulls_url":"https://api.github.com/repos/afifshato/h8-p0-w5/pulls{/number}","milestones_url":"https://api.github.com/repos/afifshato/h8-p0-w5/milestones{/number}","notifications_url":"https://api.github.com/repos/afifshato/h8-p0-w5/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/afifshato/h8-p0-w5/labels{/name}","releases_url":"https://api.github.com/repos/afifshato/h8-p0-w5/releases{/id}","deployments_url":"https://api.github.com/repos/afifshato/h8-p0-w5/deployments","created_at":"2018-07-01T11:06:48Z","updated_at":"2018-07-01T11:16:02Z","pushed_at":"2018-07-01T23:33:50Z","git_url":"git://github.com/afifshato/h8-p0-w5.git","ssh_url":"git@github.com:afifshato/h8-p0-w5.git","clone_url":"https://github.com/afifshato/h8-p0-w5.git","svn_url":"https://github.com/afifshato/h8-p0-w5","homepage":null,"size":7,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"afifshato:afifshato","ref":"afifshato","sha":"087fc7c882015e06ca34d442ac3a80dbd5f2f9bc","user":{"login":"afifshato","id":10976165,"node_id":"MDQ6VXNlcjEwOTc2MTY1","avatar_url":"https://avatars2.githubusercontent.com/u/10976165?v=4","gravatar_id":"","url":"https://api.github.com/users/afifshato","html_url":"https://github.com/afifshato","followers_url":"https://api.github.com/users/afifshato/followers","following_url":"https://api.github.com/users/afifshato/following{/other_user}","gists_url":"https://api.github.com/users/afifshato/gists{/gist_id}","starred_url":"https://api.github.com/users/afifshato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/afifshato/subscriptions","organizations_url":"https://api.github.com/users/afifshato/orgs","repos_url":"https://api.github.com/users/afifshato/repos","events_url":"https://api.github.com/users/afifshato/events{/privacy}","received_events_url":"https://api.github.com/users/afifshato/received_events","type":"User","site_admin":false},"repo":{"id":139322131,"node_id":"MDEwOlJlcG9zaXRvcnkxMzkzMjIxMzE=","name":"h8-p0-w5","full_name":"afifshato/h8-p0-w5","owner":{"login":"afifshato","id":10976165,"node_id":"MDQ6VXNlcjEwOTc2MTY1","avatar_url":"https://avatars2.githubusercontent.com/u/10976165?v=4","gravatar_id":"","url":"https://api.github.com/users/afifshato","html_url":"https://github.com/afifshato","followers_url":"https://api.github.com/users/afifshato/followers","following_url":"https://api.github.com/users/afifshato/following{/other_user}","gists_url":"https://api.github.com/users/afifshato/gists{/gist_id}","starred_url":"https://api.github.com/users/afifshato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/afifshato/subscriptions","organizations_url":"https://api.github.com/users/afifshato/orgs","repos_url":"https://api.github.com/users/afifshato/repos","events_url":"https://api.github.com/users/afifshato/events{/privacy}","received_events_url":"https://api.github.com/users/afifshato/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/afifshato/h8-p0-w5","description":null,"fork":false,"url":"https://api.github.com/repos/afifshato/h8-p0-w5","forks_url":"https://api.github.com/repos/afifshato/h8-p0-w5/forks","keys_url":"https://api.github.com/repos/afifshato/h8-p0-w5/keys{/key_id}","collaborators_url":"https://api.github.com/repos/afifshato/h8-p0-w5/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/afifshato/h8-p0-w5/teams","hooks_url":"https://api.github.com/repos/afifshato/h8-p0-w5/hooks","issue_events_url":"https://api.github.com/repos/afifshato/h8-p0-w5/issues/events{/number}","events_url":"https://api.github.com/repos/afifshato/h8-p0-w5/events","assignees_url":"https://api.github.com/repos/afifshato/h8-p0-w5/assignees{/user}","branches_url":"https://api.github.com/repos/afifshato/h8-p0-w5/branches{/branch}","tags_url":"https://api.github.com/repos/afifshato/h8-p0-w5/tags","blobs_url":"https://api.github.com/repos/afifshato/h8-p0-w5/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/afifshato/h8-p0-w5/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/afifshato/h8-p0-w5/git/refs{/sha}","trees_url":"https://api.github.com/repos/afifshato/h8-p0-w5/git/trees{/sha}","statuses_url":"https://api.github.com/repos/afifshato/h8-p0-w5/statuses/{sha}","languages_url":"https://api.github.com/repos/afifshato/h8-p0-w5/languages","stargazers_url":"https://api.github.com/repos/afifshato/h8-p0-w5/stargazers","contributors_url":"https://api.github.com/repos/afifshato/h8-p0-w5/contributors","subscribers_url":"https://api.github.com/repos/afifshato/h8-p0-w5/subscribers","subscription_url":"https://api.github.com/repos/afifshato/h8-p0-w5/subscription","commits_url":"https://api.github.com/repos/afifshato/h8-p0-w5/commits{/sha}","git_commits_url":"https://api.github.com/repos/afifshato/h8-p0-w5/git/commits{/sha}","comments_url":"https://api.github.com/repos/afifshato/h8-p0-w5/comments{/number}","issue_comment_url":"https://api.github.com/repos/afifshato/h8-p0-w5/issues/comments{/number}","contents_url":"https://api.github.com/repos/afifshato/h8-p0-w5/contents/{+path}","compare_url":"https://api.github.com/repos/afifshato/h8-p0-w5/compare/{base}...{head}","merges_url":"https://api.github.com/repos/afifshato/h8-p0-w5/merges","archive_url":"https://api.github.com/repos/afifshato/h8-p0-w5/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/afifshato/h8-p0-w5/downloads","issues_url":"https://api.github.com/repos/afifshato/h8-p0-w5/issues{/number}","pulls_url":"https://api.github.com/repos/afifshato/h8-p0-w5/pulls{/number}","milestones_url":"https://api.github.com/repos/afifshato/h8-p0-w5/milestones{/number}","notifications_url":"https://api.github.com/repos/afifshato/h8-p0-w5/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/afifshato/h8-p0-w5/labels{/name}","releases_url":"https://api.github.com/repos/afifshato/h8-p0-w5/releases{/id}","deployments_url":"https://api.github.com/repos/afifshato/h8-p0-w5/deployments","created_at":"2018-07-01T11:06:48Z","updated_at":"2018-07-01T11:16:02Z","pushed_at":"2018-07-01T23:33:50Z","git_url":"git://github.com/afifshato/h8-p0-w5.git","ssh_url":"git@github.com:afifshato/h8-p0-w5.git","clone_url":"https://github.com/afifshato/h8-p0-w5.git","svn_url":"https://github.com/afifshato/h8-p0-w5","homepage":null,"size":7,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/afifshato/h8-p0-w5/pulls/1"},"html":{"href":"https://github.com/afifshato/h8-p0-w5/pull/1"},"issue":{"href":"https://api.github.com/repos/afifshato/h8-p0-w5/issues/1"},"comments":{"href":"https://api.github.com/repos/afifshato/h8-p0-w5/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/afifshato/h8-p0-w5/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/afifshato/h8-p0-w5/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/afifshato/h8-p0-w5/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/afifshato/h8-p0-w5/statuses/238a275cc97cd7970a81cda6ce9f74c73a0ac418"}},"author_association":"OWNER","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":3,"additions":24,"deletions":29,"changed_files":2}}
{"actor":{"display_login":"afifshato"}}