{"action":"created","comment":{"url":"https://api.github.com/repos/rafaeleyng/does-match/pulls/comments/48184774","id":48184774,"diff_hunk":"@@ -37,45 +37,108 @@\n       return string;\n     }\n \n-    var replaced = '';\n-    for (var i = 0, size = string.length; i < size; i++) {\n-      replaced += replaceDiacritics(string[i]);\n-    }\n+    var replaced = string.split('').map(replaceDiacritics);\n \n-    return replaced;\n+    return replaced.join('');","path":"src/does-match.js","position":11,"original_position":11,"commit_id":"0e129f5d9a265a36eadc035f74483b31112f0aad","original_commit_id":"0e129f5d9a265a36eadc035f74483b31112f0aad","user":{"login":"ehkasper","id":988603,"avatar_url":"https://avatars.githubusercontent.com/u/988603?v=3","gravatar_id":"","url":"https://api.github.com/users/ehkasper","html_url":"https://github.com/ehkasper","followers_url":"https://api.github.com/users/ehkasper/followers","following_url":"https://api.github.com/users/ehkasper/following{/other_user}","gists_url":"https://api.github.com/users/ehkasper/gists{/gist_id}","starred_url":"https://api.github.com/users/ehkasper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ehkasper/subscriptions","organizations_url":"https://api.github.com/users/ehkasper/orgs","repos_url":"https://api.github.com/users/ehkasper/repos","events_url":"https://api.github.com/users/ehkasper/events{/privacy}","received_events_url":"https://api.github.com/users/ehkasper/received_events","type":"User","site_admin":false},"body":"Dont think this is a problem at all. See, when your application/page is loaded, the vast amount of processing goes into the SQL queries, backend, rendering or animating your page. A very low portion of the chunk that goes with your javascript is about joining/spliting arrays, or any functions like these.\r\n\r\nThis way lets you use a more fluent writing, making it easier for people to read and contribute, besides keeping your code simpler.\r\n\r\nIf you have a performance problem with your application, it likely be with your SQL queries, image sizes, css animations, or even js loops iterating over and over, but I do not think it will be about a join, split, indexOf functions of any sort. I dont event think it'd be necessary to have benchmarks...","created_at":"2015-12-21T20:02:27Z","updated_at":"2015-12-21T20:02:27Z","html_url":"https://github.com/rafaeleyng/does-match/pull/4#discussion_r48184774","pull_request_url":"https://api.github.com/repos/rafaeleyng/does-match/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/rafaeleyng/does-match/pulls/comments/48184774"},"html":{"href":"https://github.com/rafaeleyng/does-match/pull/4#discussion_r48184774"},"pull_request":{"href":"https://api.github.com/repos/rafaeleyng/does-match/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/rafaeleyng/does-match/pulls/4","id":54258284,"html_url":"https://github.com/rafaeleyng/does-match/pull/4","diff_url":"https://github.com/rafaeleyng/does-match/pull/4.diff","patch_url":"https://github.com/rafaeleyng/does-match/pull/4.patch","issue_url":"https://api.github.com/repos/rafaeleyng/does-match/issues/4","number":4,"state":"open","locked":false,"title":"Refactoring","user":{"login":"ehkasper","id":988603,"avatar_url":"https://avatars.githubusercontent.com/u/988603?v=3","gravatar_id":"","url":"https://api.github.com/users/ehkasper","html_url":"https://github.com/ehkasper","followers_url":"https://api.github.com/users/ehkasper/followers","following_url":"https://api.github.com/users/ehkasper/following{/other_user}","gists_url":"https://api.github.com/users/ehkasper/gists{/gist_id}","starred_url":"https://api.github.com/users/ehkasper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ehkasper/subscriptions","organizations_url":"https://api.github.com/users/ehkasper/orgs","repos_url":"https://api.github.com/users/ehkasper/repos","events_url":"https://api.github.com/users/ehkasper/events{/privacy}","received_events_url":"https://api.github.com/users/ehkasper/received_events","type":"User","site_admin":false},"body":"* `lookahead` method refactored to use a more funcional style\r\n* factory functions created, such as `matching` and `validation`. This way it is easier to use prototypal inheritance in the future, if needed\r\n* helper private funcions added to fatories, such as `isString` and `clearWhitespaces`. I'm not sure if this functions should remain private to the factories using them, but I let it as it was\r\n* programming style preserved\r\n\r\nPlease, feel free to critique the code and make changes to it.","created_at":"2015-12-21T13:52:25Z","updated_at":"2015-12-21T20:02:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e34285ab55fe8be1f7e879232088a98e9fabbed8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rafaeleyng/does-match/pulls/4/commits","review_comments_url":"https://api.github.com/repos/rafaeleyng/does-match/pulls/4/comments","review_comment_url":"https://api.github.com/repos/rafaeleyng/does-match/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rafaeleyng/does-match/issues/4/comments","statuses_url":"https://api.github.com/repos/rafaeleyng/does-match/statuses/0e129f5d9a265a36eadc035f74483b31112f0aad","head":{"label":"ehkasper:master","ref":"master","sha":"0e129f5d9a265a36eadc035f74483b31112f0aad","user":{"login":"ehkasper","id":988603,"avatar_url":"https://avatars.githubusercontent.com/u/988603?v=3","gravatar_id":"","url":"https://api.github.com/users/ehkasper","html_url":"https://github.com/ehkasper","followers_url":"https://api.github.com/users/ehkasper/followers","following_url":"https://api.github.com/users/ehkasper/following{/other_user}","gists_url":"https://api.github.com/users/ehkasper/gists{/gist_id}","starred_url":"https://api.github.com/users/ehkasper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ehkasper/subscriptions","organizations_url":"https://api.github.com/users/ehkasper/orgs","repos_url":"https://api.github.com/users/ehkasper/repos","events_url":"https://api.github.com/users/ehkasper/events{/privacy}","received_events_url":"https://api.github.com/users/ehkasper/received_events","type":"User","site_admin":false},"repo":{"id":47634922,"name":"does-match","full_name":"ehkasper/does-match","owner":{"login":"ehkasper","id":988603,"avatar_url":"https://avatars.githubusercontent.com/u/988603?v=3","gravatar_id":"","url":"https://api.github.com/users/ehkasper","html_url":"https://github.com/ehkasper","followers_url":"https://api.github.com/users/ehkasper/followers","following_url":"https://api.github.com/users/ehkasper/following{/other_user}","gists_url":"https://api.github.com/users/ehkasper/gists{/gist_id}","starred_url":"https://api.github.com/users/ehkasper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ehkasper/subscriptions","organizations_url":"https://api.github.com/users/ehkasper/orgs","repos_url":"https://api.github.com/users/ehkasper/repos","events_url":"https://api.github.com/users/ehkasper/events{/privacy}","received_events_url":"https://api.github.com/users/ehkasper/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ehkasper/does-match","description":"A small lib for matching text searches by relevance","fork":true,"url":"https://api.github.com/repos/ehkasper/does-match","forks_url":"https://api.github.com/repos/ehkasper/does-match/forks","keys_url":"https://api.github.com/repos/ehkasper/does-match/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ehkasper/does-match/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ehkasper/does-match/teams","hooks_url":"https://api.github.com/repos/ehkasper/does-match/hooks","issue_events_url":"https://api.github.com/repos/ehkasper/does-match/issues/events{/number}","events_url":"https://api.github.com/repos/ehkasper/does-match/events","assignees_url":"https://api.github.com/repos/ehkasper/does-match/assignees{/user}","branches_url":"https://api.github.com/repos/ehkasper/does-match/branches{/branch}","tags_url":"https://api.github.com/repos/ehkasper/does-match/tags","blobs_url":"https://api.github.com/repos/ehkasper/does-match/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ehkasper/does-match/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ehkasper/does-match/git/refs{/sha}","trees_url":"https://api.github.com/repos/ehkasper/does-match/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ehkasper/does-match/statuses/{sha}","languages_url":"https://api.github.com/repos/ehkasper/does-match/languages","stargazers_url":"https://api.github.com/repos/ehkasper/does-match/stargazers","contributors_url":"https://api.github.com/repos/ehkasper/does-match/contributors","subscribers_url":"https://api.github.com/repos/ehkasper/does-match/subscribers","subscription_url":"https://api.github.com/repos/ehkasper/does-match/subscription","commits_url":"https://api.github.com/repos/ehkasper/does-match/commits{/sha}","git_commits_url":"https://api.github.com/repos/ehkasper/does-match/git/commits{/sha}","comments_url":"https://api.github.com/repos/ehkasper/does-match/comments{/number}","issue_comment_url":"https://api.github.com/repos/ehkasper/does-match/issues/comments{/number}","contents_url":"https://api.github.com/repos/ehkasper/does-match/contents/{+path}","compare_url":"https://api.github.com/repos/ehkasper/does-match/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ehkasper/does-match/merges","archive_url":"https://api.github.com/repos/ehkasper/does-match/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ehkasper/does-match/downloads","issues_url":"https://api.github.com/repos/ehkasper/does-match/issues{/number}","pulls_url":"https://api.github.com/repos/ehkasper/does-match/pulls{/number}","milestones_url":"https://api.github.com/repos/ehkasper/does-match/milestones{/number}","notifications_url":"https://api.github.com/repos/ehkasper/does-match/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ehkasper/does-match/labels{/name}","releases_url":"https://api.github.com/repos/ehkasper/does-match/releases{/id}","created_at":"2015-12-08T16:37:56Z","updated_at":"2015-12-08T16:37:57Z","pushed_at":"2015-12-21T13:49:33Z","git_url":"git://github.com/ehkasper/does-match.git","ssh_url":"git@github.com:ehkasper/does-match.git","clone_url":"https://github.com/ehkasper/does-match.git","svn_url":"https://github.com/ehkasper/does-match","homepage":null,"size":55,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rafaeleyng:master","ref":"master","sha":"71170bff6250deea674de2422dcfe1af8af92ebf","user":{"login":"rafaeleyng","id":4842605,"avatar_url":"https://avatars.githubusercontent.com/u/4842605?v=3","gravatar_id":"","url":"https://api.github.com/users/rafaeleyng","html_url":"https://github.com/rafaeleyng","followers_url":"https://api.github.com/users/rafaeleyng/followers","following_url":"https://api.github.com/users/rafaeleyng/following{/other_user}","gists_url":"https://api.github.com/users/rafaeleyng/gists{/gist_id}","starred_url":"https://api.github.com/users/rafaeleyng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rafaeleyng/subscriptions","organizations_url":"https://api.github.com/users/rafaeleyng/orgs","repos_url":"https://api.github.com/users/rafaeleyng/repos","events_url":"https://api.github.com/users/rafaeleyng/events{/privacy}","received_events_url":"https://api.github.com/users/rafaeleyng/received_events","type":"User","site_admin":false},"repo":{"id":46516734,"name":"does-match","full_name":"rafaeleyng/does-match","owner":{"login":"rafaeleyng","id":4842605,"avatar_url":"https://avatars.githubusercontent.com/u/4842605?v=3","gravatar_id":"","url":"https://api.github.com/users/rafaeleyng","html_url":"https://github.com/rafaeleyng","followers_url":"https://api.github.com/users/rafaeleyng/followers","following_url":"https://api.github.com/users/rafaeleyng/following{/other_user}","gists_url":"https://api.github.com/users/rafaeleyng/gists{/gist_id}","starred_url":"https://api.github.com/users/rafaeleyng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rafaeleyng/subscriptions","organizations_url":"https://api.github.com/users/rafaeleyng/orgs","repos_url":"https://api.github.com/users/rafaeleyng/repos","events_url":"https://api.github.com/users/rafaeleyng/events{/privacy}","received_events_url":"https://api.github.com/users/rafaeleyng/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rafaeleyng/does-match","description":"A small lib for matching text searches by relevance","fork":false,"url":"https://api.github.com/repos/rafaeleyng/does-match","forks_url":"https://api.github.com/repos/rafaeleyng/does-match/forks","keys_url":"https://api.github.com/repos/rafaeleyng/does-match/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rafaeleyng/does-match/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rafaeleyng/does-match/teams","hooks_url":"https://api.github.com/repos/rafaeleyng/does-match/hooks","issue_events_url":"https://api.github.com/repos/rafaeleyng/does-match/issues/events{/number}","events_url":"https://api.github.com/repos/rafaeleyng/does-match/events","assignees_url":"https://api.github.com/repos/rafaeleyng/does-match/assignees{/user}","branches_url":"https://api.github.com/repos/rafaeleyng/does-match/branches{/branch}","tags_url":"https://api.github.com/repos/rafaeleyng/does-match/tags","blobs_url":"https://api.github.com/repos/rafaeleyng/does-match/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rafaeleyng/does-match/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rafaeleyng/does-match/git/refs{/sha}","trees_url":"https://api.github.com/repos/rafaeleyng/does-match/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rafaeleyng/does-match/statuses/{sha}","languages_url":"https://api.github.com/repos/rafaeleyng/does-match/languages","stargazers_url":"https://api.github.com/repos/rafaeleyng/does-match/stargazers","contributors_url":"https://api.github.com/repos/rafaeleyng/does-match/contributors","subscribers_url":"https://api.github.com/repos/rafaeleyng/does-match/subscribers","subscription_url":"https://api.github.com/repos/rafaeleyng/does-match/subscription","commits_url":"https://api.github.com/repos/rafaeleyng/does-match/commits{/sha}","git_commits_url":"https://api.github.com/repos/rafaeleyng/does-match/git/commits{/sha}","comments_url":"https://api.github.com/repos/rafaeleyng/does-match/comments{/number}","issue_comment_url":"https://api.github.com/repos/rafaeleyng/does-match/issues/comments{/number}","contents_url":"https://api.github.com/repos/rafaeleyng/does-match/contents/{+path}","compare_url":"https://api.github.com/repos/rafaeleyng/does-match/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rafaeleyng/does-match/merges","archive_url":"https://api.github.com/repos/rafaeleyng/does-match/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rafaeleyng/does-match/downloads","issues_url":"https://api.github.com/repos/rafaeleyng/does-match/issues{/number}","pulls_url":"https://api.github.com/repos/rafaeleyng/does-match/pulls{/number}","milestones_url":"https://api.github.com/repos/rafaeleyng/does-match/milestones{/number}","notifications_url":"https://api.github.com/repos/rafaeleyng/does-match/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rafaeleyng/does-match/labels{/name}","releases_url":"https://api.github.com/repos/rafaeleyng/does-match/releases{/id}","created_at":"2015-11-19T19:56:12Z","updated_at":"2015-12-21T13:53:03Z","pushed_at":"2015-12-21T13:52:26Z","git_url":"git://github.com/rafaeleyng/does-match.git","ssh_url":"git@github.com:rafaeleyng/does-match.git","clone_url":"https://github.com/rafaeleyng/does-match.git","svn_url":"https://github.com/rafaeleyng/does-match","homepage":null,"size":60,"stargazers_count":4,"watchers_count":4,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":3,"mirror_url":null,"open_issues_count":2,"forks":3,"open_issues":2,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rafaeleyng/does-match/pulls/4"},"html":{"href":"https://github.com/rafaeleyng/does-match/pull/4"},"issue":{"href":"https://api.github.com/repos/rafaeleyng/does-match/issues/4"},"comments":{"href":"https://api.github.com/repos/rafaeleyng/does-match/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/rafaeleyng/does-match/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/rafaeleyng/does-match/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rafaeleyng/does-match/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/rafaeleyng/does-match/statuses/0e129f5d9a265a36eadc035f74483b31112f0aad"}}}}