{"action":"created","comment":{"url":"https://api.github.com/repos/tbranyen/diffhtml/pulls/comments/67749248","id":67749248,"diff_hunk":"@@ -441,4 +443,33 @@ newElement.innerHTML = '<div></div>';\n document.querySelector('main').diffRelease(newElement);\n ```\n \n+#### Middleware\n+\n+A controlled way of exposing the internals of diffHTML to external tooling and\n+has a very simple interface for creating and consuming.\n+\n+Two interesting projects that illustrate use cases for middleware:\n+\n+- [Logger](https://github.com/tbranyen/diffhtml-logger)\n+- [Components](https://github.com/tbranyen/diffhtml-components)\n+\n+##### Consuming\n+\n+Very simple, use the `use` method.\n+\n+``` javascript\n+import logger from 'diffhtml-logger';\n+import { use } from 'diffhtml';\n+\n+use(logger);\n+```\n+\n+##### Create\n+\n+``` javascript\n+const logMiddleware = (\n+```","path":"README.md","position":45,"original_position":45,"commit_id":"8dcb343b3406883b21f65d9273b4e7290445528a","original_commit_id":"8dcb343b3406883b21f65d9273b4e7290445528a","user":{"login":"jmeas","id":2322305,"avatar_url":"https://avatars.githubusercontent.com/u/2322305?v=3","gravatar_id":"","url":"https://api.github.com/users/jmeas","html_url":"https://github.com/jmeas","followers_url":"https://api.github.com/users/jmeas/followers","following_url":"https://api.github.com/users/jmeas/following{/other_user}","gists_url":"https://api.github.com/users/jmeas/gists{/gist_id}","starred_url":"https://api.github.com/users/jmeas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmeas/subscriptions","organizations_url":"https://api.github.com/users/jmeas/orgs","repos_url":"https://api.github.com/users/jmeas/repos","events_url":"https://api.github.com/users/jmeas/events{/privacy}","received_events_url":"https://api.github.com/users/jmeas/received_events","type":"User","site_admin":false},"body":"you prob are aware but I figured I'd mention that this code block is incomplete : P","created_at":"2016-06-20T19:16:16Z","updated_at":"2016-06-20T19:16:16Z","html_url":"https://github.com/tbranyen/diffhtml/pull/78#discussion_r67749248","pull_request_url":"https://api.github.com/repos/tbranyen/diffhtml/pulls/78","_links":{"self":{"href":"https://api.github.com/repos/tbranyen/diffhtml/pulls/comments/67749248"},"html":{"href":"https://github.com/tbranyen/diffhtml/pull/78#discussion_r67749248"},"pull_request":{"href":"https://api.github.com/repos/tbranyen/diffhtml/pulls/78"}}},"pull_request":{"url":"https://api.github.com/repos/tbranyen/diffhtml/pulls/78","id":73838502,"html_url":"https://github.com/tbranyen/diffhtml/pull/78","diff_url":"https://github.com/tbranyen/diffhtml/pull/78.diff","patch_url":"https://github.com/tbranyen/diffhtml/pull/78.patch","issue_url":"https://api.github.com/repos/tbranyen/diffhtml/issues/78","number":78,"state":"open","locked":false,"title":"Middleware","user":{"login":"tbranyen","id":181635,"avatar_url":"https://avatars.githubusercontent.com/u/181635?v=3","gravatar_id":"","url":"https://api.github.com/users/tbranyen","html_url":"https://github.com/tbranyen","followers_url":"https://api.github.com/users/tbranyen/followers","following_url":"https://api.github.com/users/tbranyen/following{/other_user}","gists_url":"https://api.github.com/users/tbranyen/gists{/gist_id}","starred_url":"https://api.github.com/users/tbranyen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tbranyen/subscriptions","organizations_url":"https://api.github.com/users/tbranyen/orgs","repos_url":"https://api.github.com/users/tbranyen/repos","events_url":"https://api.github.com/users/tbranyen/events{/privacy}","received_events_url":"https://api.github.com/users/tbranyen/received_events","type":"User","site_admin":false},"body":"This adds in the necessary code to hook up basic middleware into\r\ndiffHTML. This will open the door to external tooling to be built around\r\nit.","created_at":"2016-06-15T01:10:50Z","updated_at":"2016-06-20T19:16:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b94a06688c4168eaf4154cd9f22f88b1b02600ca","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/tbranyen/diffhtml/pulls/78/commits","review_comments_url":"https://api.github.com/repos/tbranyen/diffhtml/pulls/78/comments","review_comment_url":"https://api.github.com/repos/tbranyen/diffhtml/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tbranyen/diffhtml/issues/78/comments","statuses_url":"https://api.github.com/repos/tbranyen/diffhtml/statuses/8dcb343b3406883b21f65d9273b4e7290445528a","head":{"label":"tbranyen:add-middleware","ref":"add-middleware","sha":"8dcb343b3406883b21f65d9273b4e7290445528a","user":{"login":"tbranyen","id":181635,"avatar_url":"https://avatars.githubusercontent.com/u/181635?v=3","gravatar_id":"","url":"https://api.github.com/users/tbranyen","html_url":"https://github.com/tbranyen","followers_url":"https://api.github.com/users/tbranyen/followers","following_url":"https://api.github.com/users/tbranyen/following{/other_user}","gists_url":"https://api.github.com/users/tbranyen/gists{/gist_id}","starred_url":"https://api.github.com/users/tbranyen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tbranyen/subscriptions","organizations_url":"https://api.github.com/users/tbranyen/orgs","repos_url":"https://api.github.com/users/tbranyen/repos","events_url":"https://api.github.com/users/tbranyen/events{/privacy}","received_events_url":"https://api.github.com/users/tbranyen/received_events","type":"User","site_admin":false},"repo":{"id":34007876,"name":"diffhtml","full_name":"tbranyen/diffhtml","owner":{"login":"tbranyen","id":181635,"avatar_url":"https://avatars.githubusercontent.com/u/181635?v=3","gravatar_id":"","url":"https://api.github.com/users/tbranyen","html_url":"https://github.com/tbranyen","followers_url":"https://api.github.com/users/tbranyen/followers","following_url":"https://api.github.com/users/tbranyen/following{/other_user}","gists_url":"https://api.github.com/users/tbranyen/gists{/gist_id}","starred_url":"https://api.github.com/users/tbranyen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tbranyen/subscriptions","organizations_url":"https://api.github.com/users/tbranyen/orgs","repos_url":"https://api.github.com/users/tbranyen/repos","events_url":"https://api.github.com/users/tbranyen/events{/privacy}","received_events_url":"https://api.github.com/users/tbranyen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tbranyen/diffhtml","description":"Easily diff HTML with transitions and tagged template strings","fork":false,"url":"https://api.github.com/repos/tbranyen/diffhtml","forks_url":"https://api.github.com/repos/tbranyen/diffhtml/forks","keys_url":"https://api.github.com/repos/tbranyen/diffhtml/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tbranyen/diffhtml/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tbranyen/diffhtml/teams","hooks_url":"https://api.github.com/repos/tbranyen/diffhtml/hooks","issue_events_url":"https://api.github.com/repos/tbranyen/diffhtml/issues/events{/number}","events_url":"https://api.github.com/repos/tbranyen/diffhtml/events","assignees_url":"https://api.github.com/repos/tbranyen/diffhtml/assignees{/user}","branches_url":"https://api.github.com/repos/tbranyen/diffhtml/branches{/branch}","tags_url":"https://api.github.com/repos/tbranyen/diffhtml/tags","blobs_url":"https://api.github.com/repos/tbranyen/diffhtml/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tbranyen/diffhtml/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tbranyen/diffhtml/git/refs{/sha}","trees_url":"https://api.github.com/repos/tbranyen/diffhtml/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tbranyen/diffhtml/statuses/{sha}","languages_url":"https://api.github.com/repos/tbranyen/diffhtml/languages","stargazers_url":"https://api.github.com/repos/tbranyen/diffhtml/stargazers","contributors_url":"https://api.github.com/repos/tbranyen/diffhtml/contributors","subscribers_url":"https://api.github.com/repos/tbranyen/diffhtml/subscribers","subscription_url":"https://api.github.com/repos/tbranyen/diffhtml/subscription","commits_url":"https://api.github.com/repos/tbranyen/diffhtml/commits{/sha}","git_commits_url":"https://api.github.com/repos/tbranyen/diffhtml/git/commits{/sha}","comments_url":"https://api.github.com/repos/tbranyen/diffhtml/comments{/number}","issue_comment_url":"https://api.github.com/repos/tbranyen/diffhtml/issues/comments{/number}","contents_url":"https://api.github.com/repos/tbranyen/diffhtml/contents/{+path}","compare_url":"https://api.github.com/repos/tbranyen/diffhtml/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tbranyen/diffhtml/merges","archive_url":"https://api.github.com/repos/tbranyen/diffhtml/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tbranyen/diffhtml/downloads","issues_url":"https://api.github.com/repos/tbranyen/diffhtml/issues{/number}","pulls_url":"https://api.github.com/repos/tbranyen/diffhtml/pulls{/number}","milestones_url":"https://api.github.com/repos/tbranyen/diffhtml/milestones{/number}","notifications_url":"https://api.github.com/repos/tbranyen/diffhtml/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tbranyen/diffhtml/labels{/name}","releases_url":"https://api.github.com/repos/tbranyen/diffhtml/releases{/id}","deployments_url":"https://api.github.com/repos/tbranyen/diffhtml/deployments","created_at":"2015-04-15T17:17:05Z","updated_at":"2016-06-18T00:18:57Z","pushed_at":"2016-06-20T19:05:44Z","git_url":"git://github.com/tbranyen/diffhtml.git","ssh_url":"git@github.com:tbranyen/diffhtml.git","clone_url":"https://github.com/tbranyen/diffhtml.git","svn_url":"https://github.com/tbranyen/diffhtml","homepage":"http://www.diffhtml.org/","size":3037,"stargazers_count":369,"watchers_count":369,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":19,"mirror_url":null,"open_issues_count":8,"forks":19,"open_issues":8,"watchers":369,"default_branch":"master"}},"base":{"label":"tbranyen:master","ref":"master","sha":"649d23d74412882cf56f6d8b065edc890239b326","user":{"login":"tbranyen","id":181635,"avatar_url":"https://avatars.githubusercontent.com/u/181635?v=3","gravatar_id":"","url":"https://api.github.com/users/tbranyen","html_url":"https://github.com/tbranyen","followers_url":"https://api.github.com/users/tbranyen/followers","following_url":"https://api.github.com/users/tbranyen/following{/other_user}","gists_url":"https://api.github.com/users/tbranyen/gists{/gist_id}","starred_url":"https://api.github.com/users/tbranyen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tbranyen/subscriptions","organizations_url":"https://api.github.com/users/tbranyen/orgs","repos_url":"https://api.github.com/users/tbranyen/repos","events_url":"https://api.github.com/users/tbranyen/events{/privacy}","received_events_url":"https://api.github.com/users/tbranyen/received_events","type":"User","site_admin":false},"repo":{"id":34007876,"name":"diffhtml","full_name":"tbranyen/diffhtml","owner":{"login":"tbranyen","id":181635,"avatar_url":"https://avatars.githubusercontent.com/u/181635?v=3","gravatar_id":"","url":"https://api.github.com/users/tbranyen","html_url":"https://github.com/tbranyen","followers_url":"https://api.github.com/users/tbranyen/followers","following_url":"https://api.github.com/users/tbranyen/following{/other_user}","gists_url":"https://api.github.com/users/tbranyen/gists{/gist_id}","starred_url":"https://api.github.com/users/tbranyen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tbranyen/subscriptions","organizations_url":"https://api.github.com/users/tbranyen/orgs","repos_url":"https://api.github.com/users/tbranyen/repos","events_url":"https://api.github.com/users/tbranyen/events{/privacy}","received_events_url":"https://api.github.com/users/tbranyen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tbranyen/diffhtml","description":"Easily diff HTML with transitions and tagged template strings","fork":false,"url":"https://api.github.com/repos/tbranyen/diffhtml","forks_url":"https://api.github.com/repos/tbranyen/diffhtml/forks","keys_url":"https://api.github.com/repos/tbranyen/diffhtml/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tbranyen/diffhtml/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tbranyen/diffhtml/teams","hooks_url":"https://api.github.com/repos/tbranyen/diffhtml/hooks","issue_events_url":"https://api.github.com/repos/tbranyen/diffhtml/issues/events{/number}","events_url":"https://api.github.com/repos/tbranyen/diffhtml/events","assignees_url":"https://api.github.com/repos/tbranyen/diffhtml/assignees{/user}","branches_url":"https://api.github.com/repos/tbranyen/diffhtml/branches{/branch}","tags_url":"https://api.github.com/repos/tbranyen/diffhtml/tags","blobs_url":"https://api.github.com/repos/tbranyen/diffhtml/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tbranyen/diffhtml/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tbranyen/diffhtml/git/refs{/sha}","trees_url":"https://api.github.com/repos/tbranyen/diffhtml/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tbranyen/diffhtml/statuses/{sha}","languages_url":"https://api.github.com/repos/tbranyen/diffhtml/languages","stargazers_url":"https://api.github.com/repos/tbranyen/diffhtml/stargazers","contributors_url":"https://api.github.com/repos/tbranyen/diffhtml/contributors","subscribers_url":"https://api.github.com/repos/tbranyen/diffhtml/subscribers","subscription_url":"https://api.github.com/repos/tbranyen/diffhtml/subscription","commits_url":"https://api.github.com/repos/tbranyen/diffhtml/commits{/sha}","git_commits_url":"https://api.github.com/repos/tbranyen/diffhtml/git/commits{/sha}","comments_url":"https://api.github.com/repos/tbranyen/diffhtml/comments{/number}","issue_comment_url":"https://api.github.com/repos/tbranyen/diffhtml/issues/comments{/number}","contents_url":"https://api.github.com/repos/tbranyen/diffhtml/contents/{+path}","compare_url":"https://api.github.com/repos/tbranyen/diffhtml/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tbranyen/diffhtml/merges","archive_url":"https://api.github.com/repos/tbranyen/diffhtml/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tbranyen/diffhtml/downloads","issues_url":"https://api.github.com/repos/tbranyen/diffhtml/issues{/number}","pulls_url":"https://api.github.com/repos/tbranyen/diffhtml/pulls{/number}","milestones_url":"https://api.github.com/repos/tbranyen/diffhtml/milestones{/number}","notifications_url":"https://api.github.com/repos/tbranyen/diffhtml/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tbranyen/diffhtml/labels{/name}","releases_url":"https://api.github.com/repos/tbranyen/diffhtml/releases{/id}","deployments_url":"https://api.github.com/repos/tbranyen/diffhtml/deployments","created_at":"2015-04-15T17:17:05Z","updated_at":"2016-06-18T00:18:57Z","pushed_at":"2016-06-20T19:05:44Z","git_url":"git://github.com/tbranyen/diffhtml.git","ssh_url":"git@github.com:tbranyen/diffhtml.git","clone_url":"https://github.com/tbranyen/diffhtml.git","svn_url":"https://github.com/tbranyen/diffhtml","homepage":"http://www.diffhtml.org/","size":3037,"stargazers_count":369,"watchers_count":369,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":19,"mirror_url":null,"open_issues_count":8,"forks":19,"open_issues":8,"watchers":369,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tbranyen/diffhtml/pulls/78"},"html":{"href":"https://github.com/tbranyen/diffhtml/pull/78"},"issue":{"href":"https://api.github.com/repos/tbranyen/diffhtml/issues/78"},"comments":{"href":"https://api.github.com/repos/tbranyen/diffhtml/issues/78/comments"},"review_comments":{"href":"https://api.github.com/repos/tbranyen/diffhtml/pulls/78/comments"},"review_comment":{"href":"https://api.github.com/repos/tbranyen/diffhtml/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tbranyen/diffhtml/pulls/78/commits"},"statuses":{"href":"https://api.github.com/repos/tbranyen/diffhtml/statuses/8dcb343b3406883b21f65d9273b4e7290445528a"}}}}
{"actor":{"display_login":"jmeas"}}