{"action":"created","comment":{"url":"https://api.github.com/repos/WatchBeam/jojen/pulls/comments/54364983","id":54364983,"diff_hunk":"@@ -0,0 +1,29 @@\n+import Rule from './rule';\n+\n+/**\n+ * Helper rule that handles callback calling for synchronous validation rules.\n+ */\n+export default class SyncRule extends Rule {\n+    /**\n+     * @override\n+     */\n+    validate(params, callback) {\n+        const res = this.validateSync(params);\n+        if (res instanceof Object) {","path":"lib/types/syncRule.js","position":12,"original_position":12,"commit_id":"a9e1420ce9327a2b4e72059af06ed8fdc81d0fdf","original_commit_id":"a9e1420ce9327a2b4e72059af06ed8fdc81d0fdf","user":{"login":"connor4312","id":2230985,"avatar_url":"https://avatars.githubusercontent.com/u/2230985?v=3","gravatar_id":"","url":"https://api.github.com/users/connor4312","html_url":"https://github.com/connor4312","followers_url":"https://api.github.com/users/connor4312/followers","following_url":"https://api.github.com/users/connor4312/following{/other_user}","gists_url":"https://api.github.com/users/connor4312/gists{/gist_id}","starred_url":"https://api.github.com/users/connor4312/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/connor4312/subscriptions","organizations_url":"https://api.github.com/users/connor4312/orgs","repos_url":"https://api.github.com/users/connor4312/repos","events_url":"https://api.github.com/users/connor4312/events{/privacy}","received_events_url":"https://api.github.com/users/connor4312/received_events","type":"User","site_admin":false},"body":"micro-optimization: add `if (res === true)` to exit early for rules that pass it.","created_at":"2016-02-29T02:51:52Z","updated_at":"2016-02-29T02:51:52Z","html_url":"https://github.com/WatchBeam/jojen/pull/9#discussion_r54364983","pull_request_url":"https://api.github.com/repos/WatchBeam/jojen/pulls/9","_links":{"self":{"href":"https://api.github.com/repos/WatchBeam/jojen/pulls/comments/54364983"},"html":{"href":"https://github.com/WatchBeam/jojen/pull/9#discussion_r54364983"},"pull_request":{"href":"https://api.github.com/repos/WatchBeam/jojen/pulls/9"}}},"pull_request":{"url":"https://api.github.com/repos/WatchBeam/jojen/pulls/9","id":61014800,"html_url":"https://github.com/WatchBeam/jojen/pull/9","diff_url":"https://github.com/WatchBeam/jojen/pull/9.diff","patch_url":"https://github.com/WatchBeam/jojen/pull/9.patch","issue_url":"https://api.github.com/repos/WatchBeam/jojen/issues/9","number":9,"state":"open","locked":false,"title":"[wip] Feature/backend functionality","user":{"login":"SimonSchick","id":3259089,"avatar_url":"https://avatars.githubusercontent.com/u/3259089?v=3","gravatar_id":"","url":"https://api.github.com/users/SimonSchick","html_url":"https://github.com/SimonSchick","followers_url":"https://api.github.com/users/SimonSchick/followers","following_url":"https://api.github.com/users/SimonSchick/following{/other_user}","gists_url":"https://api.github.com/users/SimonSchick/gists{/gist_id}","starred_url":"https://api.github.com/users/SimonSchick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SimonSchick/subscriptions","organizations_url":"https://api.github.com/users/SimonSchick/orgs","repos_url":"https://api.github.com/users/SimonSchick/repos","events_url":"https://api.github.com/users/SimonSchick/events{/privacy}","received_events_url":"https://api.github.com/users/SimonSchick/received_events","type":"User","site_admin":false},"body":"Added boolean, string, number and function validation.\r\nAlso added assert.\r\nAdded alternatives.\r\n","created_at":"2016-02-29T00:33:05Z","updated_at":"2016-02-29T02:51:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c06a00f9e59495eeb52104b60a4be57dc6a12f39","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/WatchBeam/jojen/pulls/9/commits","review_comments_url":"https://api.github.com/repos/WatchBeam/jojen/pulls/9/comments","review_comment_url":"https://api.github.com/repos/WatchBeam/jojen/pulls/comments{/number}","comments_url":"https://api.github.com/repos/WatchBeam/jojen/issues/9/comments","statuses_url":"https://api.github.com/repos/WatchBeam/jojen/statuses/a9e1420ce9327a2b4e72059af06ed8fdc81d0fdf","head":{"label":"WatchBeam:feature/backend-functionality","ref":"feature/backend-functionality","sha":"a9e1420ce9327a2b4e72059af06ed8fdc81d0fdf","user":{"login":"WatchBeam","id":11798804,"avatar_url":"https://avatars.githubusercontent.com/u/11798804?v=3","gravatar_id":"","url":"https://api.github.com/users/WatchBeam","html_url":"https://github.com/WatchBeam","followers_url":"https://api.github.com/users/WatchBeam/followers","following_url":"https://api.github.com/users/WatchBeam/following{/other_user}","gists_url":"https://api.github.com/users/WatchBeam/gists{/gist_id}","starred_url":"https://api.github.com/users/WatchBeam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WatchBeam/subscriptions","organizations_url":"https://api.github.com/users/WatchBeam/orgs","repos_url":"https://api.github.com/users/WatchBeam/repos","events_url":"https://api.github.com/users/WatchBeam/events{/privacy}","received_events_url":"https://api.github.com/users/WatchBeam/received_events","type":"Organization","site_admin":false},"repo":{"id":40452247,"name":"jojen","full_name":"WatchBeam/jojen","owner":{"login":"WatchBeam","id":11798804,"avatar_url":"https://avatars.githubusercontent.com/u/11798804?v=3","gravatar_id":"","url":"https://api.github.com/users/WatchBeam","html_url":"https://github.com/WatchBeam","followers_url":"https://api.github.com/users/WatchBeam/followers","following_url":"https://api.github.com/users/WatchBeam/following{/other_user}","gists_url":"https://api.github.com/users/WatchBeam/gists{/gist_id}","starred_url":"https://api.github.com/users/WatchBeam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WatchBeam/subscriptions","organizations_url":"https://api.github.com/users/WatchBeam/orgs","repos_url":"https://api.github.com/users/WatchBeam/repos","events_url":"https://api.github.com/users/WatchBeam/events{/privacy}","received_events_url":"https://api.github.com/users/WatchBeam/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/WatchBeam/jojen","description":"Expressive validator for Node and the browser, with a small footprint and awesome performance","fork":false,"url":"https://api.github.com/repos/WatchBeam/jojen","forks_url":"https://api.github.com/repos/WatchBeam/jojen/forks","keys_url":"https://api.github.com/repos/WatchBeam/jojen/keys{/key_id}","collaborators_url":"https://api.github.com/repos/WatchBeam/jojen/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/WatchBeam/jojen/teams","hooks_url":"https://api.github.com/repos/WatchBeam/jojen/hooks","issue_events_url":"https://api.github.com/repos/WatchBeam/jojen/issues/events{/number}","events_url":"https://api.github.com/repos/WatchBeam/jojen/events","assignees_url":"https://api.github.com/repos/WatchBeam/jojen/assignees{/user}","branches_url":"https://api.github.com/repos/WatchBeam/jojen/branches{/branch}","tags_url":"https://api.github.com/repos/WatchBeam/jojen/tags","blobs_url":"https://api.github.com/repos/WatchBeam/jojen/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/WatchBeam/jojen/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/WatchBeam/jojen/git/refs{/sha}","trees_url":"https://api.github.com/repos/WatchBeam/jojen/git/trees{/sha}","statuses_url":"https://api.github.com/repos/WatchBeam/jojen/statuses/{sha}","languages_url":"https://api.github.com/repos/WatchBeam/jojen/languages","stargazers_url":"https://api.github.com/repos/WatchBeam/jojen/stargazers","contributors_url":"https://api.github.com/repos/WatchBeam/jojen/contributors","subscribers_url":"https://api.github.com/repos/WatchBeam/jojen/subscribers","subscription_url":"https://api.github.com/repos/WatchBeam/jojen/subscription","commits_url":"https://api.github.com/repos/WatchBeam/jojen/commits{/sha}","git_commits_url":"https://api.github.com/repos/WatchBeam/jojen/git/commits{/sha}","comments_url":"https://api.github.com/repos/WatchBeam/jojen/comments{/number}","issue_comment_url":"https://api.github.com/repos/WatchBeam/jojen/issues/comments{/number}","contents_url":"https://api.github.com/repos/WatchBeam/jojen/contents/{+path}","compare_url":"https://api.github.com/repos/WatchBeam/jojen/compare/{base}...{head}","merges_url":"https://api.github.com/repos/WatchBeam/jojen/merges","archive_url":"https://api.github.com/repos/WatchBeam/jojen/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/WatchBeam/jojen/downloads","issues_url":"https://api.github.com/repos/WatchBeam/jojen/issues{/number}","pulls_url":"https://api.github.com/repos/WatchBeam/jojen/pulls{/number}","milestones_url":"https://api.github.com/repos/WatchBeam/jojen/milestones{/number}","notifications_url":"https://api.github.com/repos/WatchBeam/jojen/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/WatchBeam/jojen/labels{/name}","releases_url":"https://api.github.com/repos/WatchBeam/jojen/releases{/id}","deployments_url":"https://api.github.com/repos/WatchBeam/jojen/deployments","created_at":"2015-08-09T22:09:19Z","updated_at":"2016-02-23T19:46:01Z","pushed_at":"2016-02-29T02:33:49Z","git_url":"git://github.com/WatchBeam/jojen.git","ssh_url":"git@github.com:WatchBeam/jojen.git","clone_url":"https://github.com/WatchBeam/jojen.git","svn_url":"https://github.com/WatchBeam/jojen","homepage":"","size":63,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":2,"default_branch":"master"}},"base":{"label":"WatchBeam:develop","ref":"develop","sha":"1627cb48f7c7496368a659359960a5e57bba5fc4","user":{"login":"WatchBeam","id":11798804,"avatar_url":"https://avatars.githubusercontent.com/u/11798804?v=3","gravatar_id":"","url":"https://api.github.com/users/WatchBeam","html_url":"https://github.com/WatchBeam","followers_url":"https://api.github.com/users/WatchBeam/followers","following_url":"https://api.github.com/users/WatchBeam/following{/other_user}","gists_url":"https://api.github.com/users/WatchBeam/gists{/gist_id}","starred_url":"https://api.github.com/users/WatchBeam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WatchBeam/subscriptions","organizations_url":"https://api.github.com/users/WatchBeam/orgs","repos_url":"https://api.github.com/users/WatchBeam/repos","events_url":"https://api.github.com/users/WatchBeam/events{/privacy}","received_events_url":"https://api.github.com/users/WatchBeam/received_events","type":"Organization","site_admin":false},"repo":{"id":40452247,"name":"jojen","full_name":"WatchBeam/jojen","owner":{"login":"WatchBeam","id":11798804,"avatar_url":"https://avatars.githubusercontent.com/u/11798804?v=3","gravatar_id":"","url":"https://api.github.com/users/WatchBeam","html_url":"https://github.com/WatchBeam","followers_url":"https://api.github.com/users/WatchBeam/followers","following_url":"https://api.github.com/users/WatchBeam/following{/other_user}","gists_url":"https://api.github.com/users/WatchBeam/gists{/gist_id}","starred_url":"https://api.github.com/users/WatchBeam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WatchBeam/subscriptions","organizations_url":"https://api.github.com/users/WatchBeam/orgs","repos_url":"https://api.github.com/users/WatchBeam/repos","events_url":"https://api.github.com/users/WatchBeam/events{/privacy}","received_events_url":"https://api.github.com/users/WatchBeam/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/WatchBeam/jojen","description":"Expressive validator for Node and the browser, with a small footprint and awesome performance","fork":false,"url":"https://api.github.com/repos/WatchBeam/jojen","forks_url":"https://api.github.com/repos/WatchBeam/jojen/forks","keys_url":"https://api.github.com/repos/WatchBeam/jojen/keys{/key_id}","collaborators_url":"https://api.github.com/repos/WatchBeam/jojen/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/WatchBeam/jojen/teams","hooks_url":"https://api.github.com/repos/WatchBeam/jojen/hooks","issue_events_url":"https://api.github.com/repos/WatchBeam/jojen/issues/events{/number}","events_url":"https://api.github.com/repos/WatchBeam/jojen/events","assignees_url":"https://api.github.com/repos/WatchBeam/jojen/assignees{/user}","branches_url":"https://api.github.com/repos/WatchBeam/jojen/branches{/branch}","tags_url":"https://api.github.com/repos/WatchBeam/jojen/tags","blobs_url":"https://api.github.com/repos/WatchBeam/jojen/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/WatchBeam/jojen/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/WatchBeam/jojen/git/refs{/sha}","trees_url":"https://api.github.com/repos/WatchBeam/jojen/git/trees{/sha}","statuses_url":"https://api.github.com/repos/WatchBeam/jojen/statuses/{sha}","languages_url":"https://api.github.com/repos/WatchBeam/jojen/languages","stargazers_url":"https://api.github.com/repos/WatchBeam/jojen/stargazers","contributors_url":"https://api.github.com/repos/WatchBeam/jojen/contributors","subscribers_url":"https://api.github.com/repos/WatchBeam/jojen/subscribers","subscription_url":"https://api.github.com/repos/WatchBeam/jojen/subscription","commits_url":"https://api.github.com/repos/WatchBeam/jojen/commits{/sha}","git_commits_url":"https://api.github.com/repos/WatchBeam/jojen/git/commits{/sha}","comments_url":"https://api.github.com/repos/WatchBeam/jojen/comments{/number}","issue_comment_url":"https://api.github.com/repos/WatchBeam/jojen/issues/comments{/number}","contents_url":"https://api.github.com/repos/WatchBeam/jojen/contents/{+path}","compare_url":"https://api.github.com/repos/WatchBeam/jojen/compare/{base}...{head}","merges_url":"https://api.github.com/repos/WatchBeam/jojen/merges","archive_url":"https://api.github.com/repos/WatchBeam/jojen/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/WatchBeam/jojen/downloads","issues_url":"https://api.github.com/repos/WatchBeam/jojen/issues{/number}","pulls_url":"https://api.github.com/repos/WatchBeam/jojen/pulls{/number}","milestones_url":"https://api.github.com/repos/WatchBeam/jojen/milestones{/number}","notifications_url":"https://api.github.com/repos/WatchBeam/jojen/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/WatchBeam/jojen/labels{/name}","releases_url":"https://api.github.com/repos/WatchBeam/jojen/releases{/id}","deployments_url":"https://api.github.com/repos/WatchBeam/jojen/deployments","created_at":"2015-08-09T22:09:19Z","updated_at":"2016-02-23T19:46:01Z","pushed_at":"2016-02-29T02:33:49Z","git_url":"git://github.com/WatchBeam/jojen.git","ssh_url":"git@github.com:WatchBeam/jojen.git","clone_url":"https://github.com/WatchBeam/jojen.git","svn_url":"https://github.com/WatchBeam/jojen","homepage":"","size":63,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/WatchBeam/jojen/pulls/9"},"html":{"href":"https://github.com/WatchBeam/jojen/pull/9"},"issue":{"href":"https://api.github.com/repos/WatchBeam/jojen/issues/9"},"comments":{"href":"https://api.github.com/repos/WatchBeam/jojen/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/WatchBeam/jojen/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/WatchBeam/jojen/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/WatchBeam/jojen/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/WatchBeam/jojen/statuses/a9e1420ce9327a2b4e72059af06ed8fdc81d0fdf"}}}}