{"action":"created","comment":{"url":"https://api.github.com/repos/rpominov/kefir/pulls/comments/69711607","id":69711607,"diff_hunk":"@@ -114,6 +114,45 @@ extend(Observable.prototype, {\n     return this._off(ANY, fn);\n   },\n \n+  observe(observer, onError, onComplete) {\n+    const _this = this;\n+    let closed = false;\n+\n+    if (typeof observer === 'function') {\n+      observer = {\n+        next: observer,\n+        error: onError,\n+        complete: onComplete\n+      };\n+    }\n+\n+    const fn = function(event) {\n+      if (event.type === VALUE && observer.next) {\n+        observer.next(event.value);\n+      } else if (event.type === ERROR && observer.error) {\n+        observer.error(event.value);\n+      } else if (event.type === END && observer.complete) {\n+        observer.complete(event.value);\n+        closed = true;\n+      }\n+    };\n+\n+    this.onAny(fn);\n+\n+    return {\n+      unsubscribe() {\n+        if (!closed) {\n+          _this.offAny(fn);\n+\n+          closed = true;\n+        }\n+      },\n+      get closed() {","path":"src/observable.js","position":37,"original_position":37,"commit_id":"7f0bc6a9b347bc2f9efa3afb668bf8e76fe2fdba","original_commit_id":"7f0bc6a9b347bc2f9efa3afb668bf8e76fe2fdba","user":{"login":"mAAdhaTTah","id":4371429,"avatar_url":"https://avatars.githubusercontent.com/u/4371429?v=3","gravatar_id":"","url":"https://api.github.com/users/mAAdhaTTah","html_url":"https://github.com/mAAdhaTTah","followers_url":"https://api.github.com/users/mAAdhaTTah/followers","following_url":"https://api.github.com/users/mAAdhaTTah/following{/other_user}","gists_url":"https://api.github.com/users/mAAdhaTTah/gists{/gist_id}","starred_url":"https://api.github.com/users/mAAdhaTTah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mAAdhaTTah/subscriptions","organizations_url":"https://api.github.com/users/mAAdhaTTah/orgs","repos_url":"https://api.github.com/users/mAAdhaTTah/repos","events_url":"https://api.github.com/users/mAAdhaTTah/events{/privacy}","received_events_url":"https://api.github.com/users/mAAdhaTTah/received_events","type":"User","site_admin":false},"body":"[IE9+](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get). Do you need IE8 support?","created_at":"2016-07-06T11:05:32Z","updated_at":"2016-07-06T11:05:33Z","html_url":"https://github.com/rpominov/kefir/pull/211#discussion_r69711607","pull_request_url":"https://api.github.com/repos/rpominov/kefir/pulls/211","_links":{"self":{"href":"https://api.github.com/repos/rpominov/kefir/pulls/comments/69711607"},"html":{"href":"https://github.com/rpominov/kefir/pull/211#discussion_r69711607"},"pull_request":{"href":"https://api.github.com/repos/rpominov/kefir/pulls/211"}}},"pull_request":{"url":"https://api.github.com/repos/rpominov/kefir/pulls/211","id":76280750,"html_url":"https://github.com/rpominov/kefir/pull/211","diff_url":"https://github.com/rpominov/kefir/pull/211.diff","patch_url":"https://github.com/rpominov/kefir/pull/211.patch","issue_url":"https://api.github.com/repos/rpominov/kefir/issues/211","number":211,"state":"open","locked":false,"title":"Add observe method to Kefir.Observable","user":{"login":"mAAdhaTTah","id":4371429,"avatar_url":"https://avatars.githubusercontent.com/u/4371429?v=3","gravatar_id":"","url":"https://api.github.com/users/mAAdhaTTah","html_url":"https://github.com/mAAdhaTTah","followers_url":"https://api.github.com/users/mAAdhaTTah/followers","following_url":"https://api.github.com/users/mAAdhaTTah/following{/other_user}","gists_url":"https://api.github.com/users/mAAdhaTTah/gists{/gist_id}","starred_url":"https://api.github.com/users/mAAdhaTTah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mAAdhaTTah/subscriptions","organizations_url":"https://api.github.com/users/mAAdhaTTah/orgs","repos_url":"https://api.github.com/users/mAAdhaTTah/repos","events_url":"https://api.github.com/users/mAAdhaTTah/events{/privacy}","received_events_url":"https://api.github.com/users/mAAdhaTTah/received_events","type":"User","site_admin":false},"body":"I'm going to lead off by saying I know this doesn't match the [comment](https://github.com/rpominov/kefir/issues/103#issuecomment-100713065) you made. I don't have strong feelings about the difference between `observe` / `subscribe` and the subscription token vs unsub function. However, I do think if we're going to add a method that does something similar to `subscribe`, we should adhere to standards for better interoperability. That's what this matches up with.\r\n\r\nI'm happy to change around the layout if you'd really prefer the alternate you laid out above, or even include them both, but I'd like to make the case that adhering to the es-observable standard is the way to go here.\r\n\r\nI'm still getting a feel for the codebase, so if there's a better way to implement this, definitely interested in feedback as well.\r\n\r\nFixes #151.","created_at":"2016-07-05T14:10:12Z","updated_at":"2016-07-06T11:05:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7a938ab9aeaee4a27dcf2173a98a72c6415c353d","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/rpominov/kefir/pulls/211/commits","review_comments_url":"https://api.github.com/repos/rpominov/kefir/pulls/211/comments","review_comment_url":"https://api.github.com/repos/rpominov/kefir/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rpominov/kefir/issues/211/comments","statuses_url":"https://api.github.com/repos/rpominov/kefir/statuses/7f0bc6a9b347bc2f9efa3afb668bf8e76fe2fdba","head":{"label":"mAAdhaTTah:feature/subscribe","ref":"feature/subscribe","sha":"7f0bc6a9b347bc2f9efa3afb668bf8e76fe2fdba","user":{"login":"mAAdhaTTah","id":4371429,"avatar_url":"https://avatars.githubusercontent.com/u/4371429?v=3","gravatar_id":"","url":"https://api.github.com/users/mAAdhaTTah","html_url":"https://github.com/mAAdhaTTah","followers_url":"https://api.github.com/users/mAAdhaTTah/followers","following_url":"https://api.github.com/users/mAAdhaTTah/following{/other_user}","gists_url":"https://api.github.com/users/mAAdhaTTah/gists{/gist_id}","starred_url":"https://api.github.com/users/mAAdhaTTah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mAAdhaTTah/subscriptions","organizations_url":"https://api.github.com/users/mAAdhaTTah/orgs","repos_url":"https://api.github.com/users/mAAdhaTTah/repos","events_url":"https://api.github.com/users/mAAdhaTTah/events{/privacy}","received_events_url":"https://api.github.com/users/mAAdhaTTah/received_events","type":"User","site_admin":false},"repo":{"id":62187702,"name":"kefir","full_name":"mAAdhaTTah/kefir","owner":{"login":"mAAdhaTTah","id":4371429,"avatar_url":"https://avatars.githubusercontent.com/u/4371429?v=3","gravatar_id":"","url":"https://api.github.com/users/mAAdhaTTah","html_url":"https://github.com/mAAdhaTTah","followers_url":"https://api.github.com/users/mAAdhaTTah/followers","following_url":"https://api.github.com/users/mAAdhaTTah/following{/other_user}","gists_url":"https://api.github.com/users/mAAdhaTTah/gists{/gist_id}","starred_url":"https://api.github.com/users/mAAdhaTTah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mAAdhaTTah/subscriptions","organizations_url":"https://api.github.com/users/mAAdhaTTah/orgs","repos_url":"https://api.github.com/users/mAAdhaTTah/repos","events_url":"https://api.github.com/users/mAAdhaTTah/events{/privacy}","received_events_url":"https://api.github.com/users/mAAdhaTTah/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mAAdhaTTah/kefir","description":"A Reactive Programming library for JavaScript","fork":true,"url":"https://api.github.com/repos/mAAdhaTTah/kefir","forks_url":"https://api.github.com/repos/mAAdhaTTah/kefir/forks","keys_url":"https://api.github.com/repos/mAAdhaTTah/kefir/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mAAdhaTTah/kefir/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mAAdhaTTah/kefir/teams","hooks_url":"https://api.github.com/repos/mAAdhaTTah/kefir/hooks","issue_events_url":"https://api.github.com/repos/mAAdhaTTah/kefir/issues/events{/number}","events_url":"https://api.github.com/repos/mAAdhaTTah/kefir/events","assignees_url":"https://api.github.com/repos/mAAdhaTTah/kefir/assignees{/user}","branches_url":"https://api.github.com/repos/mAAdhaTTah/kefir/branches{/branch}","tags_url":"https://api.github.com/repos/mAAdhaTTah/kefir/tags","blobs_url":"https://api.github.com/repos/mAAdhaTTah/kefir/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mAAdhaTTah/kefir/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mAAdhaTTah/kefir/git/refs{/sha}","trees_url":"https://api.github.com/repos/mAAdhaTTah/kefir/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mAAdhaTTah/kefir/statuses/{sha}","languages_url":"https://api.github.com/repos/mAAdhaTTah/kefir/languages","stargazers_url":"https://api.github.com/repos/mAAdhaTTah/kefir/stargazers","contributors_url":"https://api.github.com/repos/mAAdhaTTah/kefir/contributors","subscribers_url":"https://api.github.com/repos/mAAdhaTTah/kefir/subscribers","subscription_url":"https://api.github.com/repos/mAAdhaTTah/kefir/subscription","commits_url":"https://api.github.com/repos/mAAdhaTTah/kefir/commits{/sha}","git_commits_url":"https://api.github.com/repos/mAAdhaTTah/kefir/git/commits{/sha}","comments_url":"https://api.github.com/repos/mAAdhaTTah/kefir/comments{/number}","issue_comment_url":"https://api.github.com/repos/mAAdhaTTah/kefir/issues/comments{/number}","contents_url":"https://api.github.com/repos/mAAdhaTTah/kefir/contents/{+path}","compare_url":"https://api.github.com/repos/mAAdhaTTah/kefir/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mAAdhaTTah/kefir/merges","archive_url":"https://api.github.com/repos/mAAdhaTTah/kefir/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mAAdhaTTah/kefir/downloads","issues_url":"https://api.github.com/repos/mAAdhaTTah/kefir/issues{/number}","pulls_url":"https://api.github.com/repos/mAAdhaTTah/kefir/pulls{/number}","milestones_url":"https://api.github.com/repos/mAAdhaTTah/kefir/milestones{/number}","notifications_url":"https://api.github.com/repos/mAAdhaTTah/kefir/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mAAdhaTTah/kefir/labels{/name}","releases_url":"https://api.github.com/repos/mAAdhaTTah/kefir/releases{/id}","deployments_url":"https://api.github.com/repos/mAAdhaTTah/kefir/deployments","created_at":"2016-06-29T02:04:51Z","updated_at":"2016-06-29T02:04:52Z","pushed_at":"2016-07-06T02:52:39Z","git_url":"git://github.com/mAAdhaTTah/kefir.git","ssh_url":"git@github.com:mAAdhaTTah/kefir.git","clone_url":"https://github.com/mAAdhaTTah/kefir.git","svn_url":"https://github.com/mAAdhaTTah/kefir","homepage":"http://rpominov.github.io/kefir","size":8189,"stargazers_count":0,"watchers_count":0,"language":"CoffeeScript","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"rpominov:master","ref":"master","sha":"ef08a4c6de2d2e7abc7dff45abce792960b83d1a","user":{"login":"rpominov","id":825702,"avatar_url":"https://avatars.githubusercontent.com/u/825702?v=3","gravatar_id":"","url":"https://api.github.com/users/rpominov","html_url":"https://github.com/rpominov","followers_url":"https://api.github.com/users/rpominov/followers","following_url":"https://api.github.com/users/rpominov/following{/other_user}","gists_url":"https://api.github.com/users/rpominov/gists{/gist_id}","starred_url":"https://api.github.com/users/rpominov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rpominov/subscriptions","organizations_url":"https://api.github.com/users/rpominov/orgs","repos_url":"https://api.github.com/users/rpominov/repos","events_url":"https://api.github.com/users/rpominov/events{/privacy}","received_events_url":"https://api.github.com/users/rpominov/received_events","type":"User","site_admin":false},"repo":{"id":19428677,"name":"kefir","full_name":"rpominov/kefir","owner":{"login":"rpominov","id":825702,"avatar_url":"https://avatars.githubusercontent.com/u/825702?v=3","gravatar_id":"","url":"https://api.github.com/users/rpominov","html_url":"https://github.com/rpominov","followers_url":"https://api.github.com/users/rpominov/followers","following_url":"https://api.github.com/users/rpominov/following{/other_user}","gists_url":"https://api.github.com/users/rpominov/gists{/gist_id}","starred_url":"https://api.github.com/users/rpominov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rpominov/subscriptions","organizations_url":"https://api.github.com/users/rpominov/orgs","repos_url":"https://api.github.com/users/rpominov/repos","events_url":"https://api.github.com/users/rpominov/events{/privacy}","received_events_url":"https://api.github.com/users/rpominov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rpominov/kefir","description":"A Reactive Programming library for JavaScript","fork":false,"url":"https://api.github.com/repos/rpominov/kefir","forks_url":"https://api.github.com/repos/rpominov/kefir/forks","keys_url":"https://api.github.com/repos/rpominov/kefir/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rpominov/kefir/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rpominov/kefir/teams","hooks_url":"https://api.github.com/repos/rpominov/kefir/hooks","issue_events_url":"https://api.github.com/repos/rpominov/kefir/issues/events{/number}","events_url":"https://api.github.com/repos/rpominov/kefir/events","assignees_url":"https://api.github.com/repos/rpominov/kefir/assignees{/user}","branches_url":"https://api.github.com/repos/rpominov/kefir/branches{/branch}","tags_url":"https://api.github.com/repos/rpominov/kefir/tags","blobs_url":"https://api.github.com/repos/rpominov/kefir/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rpominov/kefir/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rpominov/kefir/git/refs{/sha}","trees_url":"https://api.github.com/repos/rpominov/kefir/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rpominov/kefir/statuses/{sha}","languages_url":"https://api.github.com/repos/rpominov/kefir/languages","stargazers_url":"https://api.github.com/repos/rpominov/kefir/stargazers","contributors_url":"https://api.github.com/repos/rpominov/kefir/contributors","subscribers_url":"https://api.github.com/repos/rpominov/kefir/subscribers","subscription_url":"https://api.github.com/repos/rpominov/kefir/subscription","commits_url":"https://api.github.com/repos/rpominov/kefir/commits{/sha}","git_commits_url":"https://api.github.com/repos/rpominov/kefir/git/commits{/sha}","comments_url":"https://api.github.com/repos/rpominov/kefir/comments{/number}","issue_comment_url":"https://api.github.com/repos/rpominov/kefir/issues/comments{/number}","contents_url":"https://api.github.com/repos/rpominov/kefir/contents/{+path}","compare_url":"https://api.github.com/repos/rpominov/kefir/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rpominov/kefir/merges","archive_url":"https://api.github.com/repos/rpominov/kefir/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rpominov/kefir/downloads","issues_url":"https://api.github.com/repos/rpominov/kefir/issues{/number}","pulls_url":"https://api.github.com/repos/rpominov/kefir/pulls{/number}","milestones_url":"https://api.github.com/repos/rpominov/kefir/milestones{/number}","notifications_url":"https://api.github.com/repos/rpominov/kefir/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rpominov/kefir/labels{/name}","releases_url":"https://api.github.com/repos/rpominov/kefir/releases{/id}","deployments_url":"https://api.github.com/repos/rpominov/kefir/deployments","created_at":"2014-05-04T14:52:16Z","updated_at":"2016-07-05T18:41:56Z","pushed_at":"2016-07-06T02:52:40Z","git_url":"git://github.com/rpominov/kefir.git","ssh_url":"git@github.com:rpominov/kefir.git","clone_url":"https://github.com/rpominov/kefir.git","svn_url":"https://github.com/rpominov/kefir","homepage":"http://rpominov.github.io/kefir","size":14430,"stargazers_count":1054,"watchers_count":1054,"language":"CoffeeScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":74,"mirror_url":null,"open_issues_count":30,"forks":74,"open_issues":30,"watchers":1054,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rpominov/kefir/pulls/211"},"html":{"href":"https://github.com/rpominov/kefir/pull/211"},"issue":{"href":"https://api.github.com/repos/rpominov/kefir/issues/211"},"comments":{"href":"https://api.github.com/repos/rpominov/kefir/issues/211/comments"},"review_comments":{"href":"https://api.github.com/repos/rpominov/kefir/pulls/211/comments"},"review_comment":{"href":"https://api.github.com/repos/rpominov/kefir/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rpominov/kefir/pulls/211/commits"},"statuses":{"href":"https://api.github.com/repos/rpominov/kefir/statuses/7f0bc6a9b347bc2f9efa3afb668bf8e76fe2fdba"}}}}
{"actor":{"display_login":"mAAdhaTTah"}}