{"action":"created","comment":{"url":"https://api.github.com/repos/kentcdodds/match-sorter/pulls/comments/109276140","pull_request_review_id":30373253,"id":109276140,"diff_hunk":"@@ -235,15 +235,15 @@ const tests = {\n     ],\n   },\n   'sorts items based on how closely they match': {\n-    skip: true, // wanna help make this a thing? https://github.com/kentcdodds/match-sorter/issues/21\n+    skip: false, // wanna help make this a thing? https://github.com/kentcdodds/match-sorter/issues/21\n     input: [\n       ['Antigua and Barbuda', 'India', 'Bosnia and Herzegovina', 'Indonesia'],\n       'Ina',\n     ],\n     output: [\n       // these are sorted based on how closes their letters are to one another based on the input\n-      // 2           6               8                      15\n-      'India', 'Indonesia', 'Antigua and Barbuda', 'Bosnia and Herzegovina',\n+      //    contains              2           6               8\n+      'Bosnia and Herzegovina', 'India', 'Indonesia', 'Antigua and Barbuda',","path":"src/index.test.js","position":15,"original_position":15,"commit_id":"c559256281d640be49ea4685560a433e21f0da00","original_commit_id":"c559256281d640be49ea4685560a433e21f0da00","user":{"login":"kentcdodds","id":1500684,"avatar_url":"https://avatars3.githubusercontent.com/u/1500684?v=3","gravatar_id":"","url":"https://api.github.com/users/kentcdodds","html_url":"https://github.com/kentcdodds","followers_url":"https://api.github.com/users/kentcdodds/followers","following_url":"https://api.github.com/users/kentcdodds/following{/other_user}","gists_url":"https://api.github.com/users/kentcdodds/gists{/gist_id}","starred_url":"https://api.github.com/users/kentcdodds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kentcdodds/subscriptions","organizations_url":"https://api.github.com/users/kentcdodds/orgs","repos_url":"https://api.github.com/users/kentcdodds/repos","events_url":"https://api.github.com/users/kentcdodds/events{/privacy}","received_events_url":"https://api.github.com/users/kentcdodds/received_events","type":"User","site_admin":false},"body":"Ah, nice catch :+1:","created_at":"2017-04-01T03:20:02Z","updated_at":"2017-04-01T03:20:10Z","html_url":"https://github.com/kentcdodds/match-sorter/pull/27#discussion_r109276140","pull_request_url":"https://api.github.com/repos/kentcdodds/match-sorter/pulls/27","_links":{"self":{"href":"https://api.github.com/repos/kentcdodds/match-sorter/pulls/comments/109276140"},"html":{"href":"https://github.com/kentcdodds/match-sorter/pull/27#discussion_r109276140"},"pull_request":{"href":"https://api.github.com/repos/kentcdodds/match-sorter/pulls/27"}}},"pull_request":{"url":"https://api.github.com/repos/kentcdodds/match-sorter/pulls/27","id":113760373,"html_url":"https://github.com/kentcdodds/match-sorter/pull/27","diff_url":"https://github.com/kentcdodds/match-sorter/pull/27.diff","patch_url":"https://github.com/kentcdodds/match-sorter/pull/27.patch","issue_url":"https://api.github.com/repos/kentcdodds/match-sorter/issues/27","number":27,"state":"open","locked":false,"title":"feat: Adds close match sort functionality","user":{"login":"osfan501","id":4150097,"avatar_url":"https://avatars3.githubusercontent.com/u/4150097?v=3","gravatar_id":"","url":"https://api.github.com/users/osfan501","html_url":"https://github.com/osfan501","followers_url":"https://api.github.com/users/osfan501/followers","following_url":"https://api.github.com/users/osfan501/following{/other_user}","gists_url":"https://api.github.com/users/osfan501/gists{/gist_id}","starred_url":"https://api.github.com/users/osfan501/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/osfan501/subscriptions","organizations_url":"https://api.github.com/users/osfan501/orgs","repos_url":"https://api.github.com/users/osfan501/repos","events_url":"https://api.github.com/users/osfan501/events{/privacy}","received_events_url":"https://api.github.com/users/osfan501/received_events","type":"User","site_admin":false},"body":"If the words fall below acronym for matching, it ranks how close the match string is to the test\r\nstring. It will return a number between 1 and 2 where 2 is a perfect match and 1 is no match. It does\r\nthis by dividing 1 by the difference of the spread of the characters in the match string within the\r\ntest string and the length of the match string and subtracting that quotient from 1. It then takes\r\nthat differences and subtracts it from 2.\r\n\r\nUnfortunately, with the example given in the test, Bosnia and Herzegovina isn't the best example to use with 'ina' because it contains 'ina' verbatim, but for the rest, India is given a ranking of 1.5, Indonesia is given a ranking of 1.167 and Antigua and Barbuda is given a ranking of 1.125 placing them in the correct order. \r\n\r\n","created_at":"2017-04-01T02:58:59Z","updated_at":"2017-04-01T03:20:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/kentcdodds/match-sorter/pulls/27/commits","review_comments_url":"https://api.github.com/repos/kentcdodds/match-sorter/pulls/27/comments","review_comment_url":"https://api.github.com/repos/kentcdodds/match-sorter/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kentcdodds/match-sorter/issues/27/comments","statuses_url":"https://api.github.com/repos/kentcdodds/match-sorter/statuses/c559256281d640be49ea4685560a433e21f0da00","head":{"label":"osfan501:master","ref":"master","sha":"c559256281d640be49ea4685560a433e21f0da00","user":{"login":"osfan501","id":4150097,"avatar_url":"https://avatars3.githubusercontent.com/u/4150097?v=3","gravatar_id":"","url":"https://api.github.com/users/osfan501","html_url":"https://github.com/osfan501","followers_url":"https://api.github.com/users/osfan501/followers","following_url":"https://api.github.com/users/osfan501/following{/other_user}","gists_url":"https://api.github.com/users/osfan501/gists{/gist_id}","starred_url":"https://api.github.com/users/osfan501/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/osfan501/subscriptions","organizations_url":"https://api.github.com/users/osfan501/orgs","repos_url":"https://api.github.com/users/osfan501/repos","events_url":"https://api.github.com/users/osfan501/events{/privacy}","received_events_url":"https://api.github.com/users/osfan501/received_events","type":"User","site_admin":false},"repo":{"id":73244234,"name":"match-sorter","full_name":"osfan501/match-sorter","owner":{"login":"osfan501","id":4150097,"avatar_url":"https://avatars3.githubusercontent.com/u/4150097?v=3","gravatar_id":"","url":"https://api.github.com/users/osfan501","html_url":"https://github.com/osfan501","followers_url":"https://api.github.com/users/osfan501/followers","following_url":"https://api.github.com/users/osfan501/following{/other_user}","gists_url":"https://api.github.com/users/osfan501/gists{/gist_id}","starred_url":"https://api.github.com/users/osfan501/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/osfan501/subscriptions","organizations_url":"https://api.github.com/users/osfan501/orgs","repos_url":"https://api.github.com/users/osfan501/repos","events_url":"https://api.github.com/users/osfan501/events{/privacy}","received_events_url":"https://api.github.com/users/osfan501/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/osfan501/match-sorter","description":"Simple, expected, and deterministic best-match sorting of an array in JavaScript","fork":true,"url":"https://api.github.com/repos/osfan501/match-sorter","forks_url":"https://api.github.com/repos/osfan501/match-sorter/forks","keys_url":"https://api.github.com/repos/osfan501/match-sorter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/osfan501/match-sorter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/osfan501/match-sorter/teams","hooks_url":"https://api.github.com/repos/osfan501/match-sorter/hooks","issue_events_url":"https://api.github.com/repos/osfan501/match-sorter/issues/events{/number}","events_url":"https://api.github.com/repos/osfan501/match-sorter/events","assignees_url":"https://api.github.com/repos/osfan501/match-sorter/assignees{/user}","branches_url":"https://api.github.com/repos/osfan501/match-sorter/branches{/branch}","tags_url":"https://api.github.com/repos/osfan501/match-sorter/tags","blobs_url":"https://api.github.com/repos/osfan501/match-sorter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/osfan501/match-sorter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/osfan501/match-sorter/git/refs{/sha}","trees_url":"https://api.github.com/repos/osfan501/match-sorter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/osfan501/match-sorter/statuses/{sha}","languages_url":"https://api.github.com/repos/osfan501/match-sorter/languages","stargazers_url":"https://api.github.com/repos/osfan501/match-sorter/stargazers","contributors_url":"https://api.github.com/repos/osfan501/match-sorter/contributors","subscribers_url":"https://api.github.com/repos/osfan501/match-sorter/subscribers","subscription_url":"https://api.github.com/repos/osfan501/match-sorter/subscription","commits_url":"https://api.github.com/repos/osfan501/match-sorter/commits{/sha}","git_commits_url":"https://api.github.com/repos/osfan501/match-sorter/git/commits{/sha}","comments_url":"https://api.github.com/repos/osfan501/match-sorter/comments{/number}","issue_comment_url":"https://api.github.com/repos/osfan501/match-sorter/issues/comments{/number}","contents_url":"https://api.github.com/repos/osfan501/match-sorter/contents/{+path}","compare_url":"https://api.github.com/repos/osfan501/match-sorter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/osfan501/match-sorter/merges","archive_url":"https://api.github.com/repos/osfan501/match-sorter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/osfan501/match-sorter/downloads","issues_url":"https://api.github.com/repos/osfan501/match-sorter/issues{/number}","pulls_url":"https://api.github.com/repos/osfan501/match-sorter/pulls{/number}","milestones_url":"https://api.github.com/repos/osfan501/match-sorter/milestones{/number}","notifications_url":"https://api.github.com/repos/osfan501/match-sorter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/osfan501/match-sorter/labels{/name}","releases_url":"https://api.github.com/repos/osfan501/match-sorter/releases{/id}","deployments_url":"https://api.github.com/repos/osfan501/match-sorter/deployments","created_at":"2016-11-09T01:58:16Z","updated_at":"2016-11-09T01:58:17Z","pushed_at":"2017-04-01T02:49:59Z","git_url":"git://github.com/osfan501/match-sorter.git","ssh_url":"git@github.com:osfan501/match-sorter.git","clone_url":"https://github.com/osfan501/match-sorter.git","svn_url":"https://github.com/osfan501/match-sorter","homepage":"https://www.npmjs.com/package/match-sorter","size":48,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"kentcdodds:master","ref":"master","sha":"9accc43e1f648700319e3d671a4f9d027c998101","user":{"login":"kentcdodds","id":1500684,"avatar_url":"https://avatars3.githubusercontent.com/u/1500684?v=3","gravatar_id":"","url":"https://api.github.com/users/kentcdodds","html_url":"https://github.com/kentcdodds","followers_url":"https://api.github.com/users/kentcdodds/followers","following_url":"https://api.github.com/users/kentcdodds/following{/other_user}","gists_url":"https://api.github.com/users/kentcdodds/gists{/gist_id}","starred_url":"https://api.github.com/users/kentcdodds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kentcdodds/subscriptions","organizations_url":"https://api.github.com/users/kentcdodds/orgs","repos_url":"https://api.github.com/users/kentcdodds/repos","events_url":"https://api.github.com/users/kentcdodds/events{/privacy}","received_events_url":"https://api.github.com/users/kentcdodds/received_events","type":"User","site_admin":false},"repo":{"id":66523440,"name":"match-sorter","full_name":"kentcdodds/match-sorter","owner":{"login":"kentcdodds","id":1500684,"avatar_url":"https://avatars3.githubusercontent.com/u/1500684?v=3","gravatar_id":"","url":"https://api.github.com/users/kentcdodds","html_url":"https://github.com/kentcdodds","followers_url":"https://api.github.com/users/kentcdodds/followers","following_url":"https://api.github.com/users/kentcdodds/following{/other_user}","gists_url":"https://api.github.com/users/kentcdodds/gists{/gist_id}","starred_url":"https://api.github.com/users/kentcdodds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kentcdodds/subscriptions","organizations_url":"https://api.github.com/users/kentcdodds/orgs","repos_url":"https://api.github.com/users/kentcdodds/repos","events_url":"https://api.github.com/users/kentcdodds/events{/privacy}","received_events_url":"https://api.github.com/users/kentcdodds/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kentcdodds/match-sorter","description":"Simple, expected, and deterministic best-match sorting of an array in JavaScript","fork":false,"url":"https://api.github.com/repos/kentcdodds/match-sorter","forks_url":"https://api.github.com/repos/kentcdodds/match-sorter/forks","keys_url":"https://api.github.com/repos/kentcdodds/match-sorter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kentcdodds/match-sorter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kentcdodds/match-sorter/teams","hooks_url":"https://api.github.com/repos/kentcdodds/match-sorter/hooks","issue_events_url":"https://api.github.com/repos/kentcdodds/match-sorter/issues/events{/number}","events_url":"https://api.github.com/repos/kentcdodds/match-sorter/events","assignees_url":"https://api.github.com/repos/kentcdodds/match-sorter/assignees{/user}","branches_url":"https://api.github.com/repos/kentcdodds/match-sorter/branches{/branch}","tags_url":"https://api.github.com/repos/kentcdodds/match-sorter/tags","blobs_url":"https://api.github.com/repos/kentcdodds/match-sorter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kentcdodds/match-sorter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kentcdodds/match-sorter/git/refs{/sha}","trees_url":"https://api.github.com/repos/kentcdodds/match-sorter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kentcdodds/match-sorter/statuses/{sha}","languages_url":"https://api.github.com/repos/kentcdodds/match-sorter/languages","stargazers_url":"https://api.github.com/repos/kentcdodds/match-sorter/stargazers","contributors_url":"https://api.github.com/repos/kentcdodds/match-sorter/contributors","subscribers_url":"https://api.github.com/repos/kentcdodds/match-sorter/subscribers","subscription_url":"https://api.github.com/repos/kentcdodds/match-sorter/subscription","commits_url":"https://api.github.com/repos/kentcdodds/match-sorter/commits{/sha}","git_commits_url":"https://api.github.com/repos/kentcdodds/match-sorter/git/commits{/sha}","comments_url":"https://api.github.com/repos/kentcdodds/match-sorter/comments{/number}","issue_comment_url":"https://api.github.com/repos/kentcdodds/match-sorter/issues/comments{/number}","contents_url":"https://api.github.com/repos/kentcdodds/match-sorter/contents/{+path}","compare_url":"https://api.github.com/repos/kentcdodds/match-sorter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kentcdodds/match-sorter/merges","archive_url":"https://api.github.com/repos/kentcdodds/match-sorter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kentcdodds/match-sorter/downloads","issues_url":"https://api.github.com/repos/kentcdodds/match-sorter/issues{/number}","pulls_url":"https://api.github.com/repos/kentcdodds/match-sorter/pulls{/number}","milestones_url":"https://api.github.com/repos/kentcdodds/match-sorter/milestones{/number}","notifications_url":"https://api.github.com/repos/kentcdodds/match-sorter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kentcdodds/match-sorter/labels{/name}","releases_url":"https://api.github.com/repos/kentcdodds/match-sorter/releases{/id}","deployments_url":"https://api.github.com/repos/kentcdodds/match-sorter/deployments","created_at":"2016-08-25T04:04:48Z","updated_at":"2017-03-31T09:43:07Z","pushed_at":"2017-04-01T02:59:00Z","git_url":"git://github.com/kentcdodds/match-sorter.git","ssh_url":"git@github.com:kentcdodds/match-sorter.git","clone_url":"https://github.com/kentcdodds/match-sorter.git","svn_url":"https://github.com/kentcdodds/match-sorter","homepage":"https://www.npmjs.com/package/match-sorter","size":97,"stargazers_count":272,"watchers_count":272,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":7,"forks":10,"open_issues":7,"watchers":272,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kentcdodds/match-sorter/pulls/27"},"html":{"href":"https://github.com/kentcdodds/match-sorter/pull/27"},"issue":{"href":"https://api.github.com/repos/kentcdodds/match-sorter/issues/27"},"comments":{"href":"https://api.github.com/repos/kentcdodds/match-sorter/issues/27/comments"},"review_comments":{"href":"https://api.github.com/repos/kentcdodds/match-sorter/pulls/27/comments"},"review_comment":{"href":"https://api.github.com/repos/kentcdodds/match-sorter/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kentcdodds/match-sorter/pulls/27/commits"},"statuses":{"href":"https://api.github.com/repos/kentcdodds/match-sorter/statuses/c559256281d640be49ea4685560a433e21f0da00"}}}}
{"actor":{"display_login":"kentcdodds"}}