{"action":"created","issue":{"url":"https://api.github.com/repos/cyclejs/collection/issues/12","repository_url":"https://api.github.com/repos/cyclejs/collection","labels_url":"https://api.github.com/repos/cyclejs/collection/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/cyclejs/collection/issues/12/comments","events_url":"https://api.github.com/repos/cyclejs/collection/issues/12/events","html_url":"https://github.com/cyclejs/collection/pull/12","id":159388928,"number":12,"title":"Collection.gather","user":{"login":"Hypnosphi","id":6651625,"avatar_url":"https://avatars.githubusercontent.com/u/6651625?v=3","gravatar_id":"","url":"https://api.github.com/users/Hypnosphi","html_url":"https://github.com/Hypnosphi","followers_url":"https://api.github.com/users/Hypnosphi/followers","following_url":"https://api.github.com/users/Hypnosphi/following{/other_user}","gists_url":"https://api.github.com/users/Hypnosphi/gists{/gist_id}","starred_url":"https://api.github.com/users/Hypnosphi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hypnosphi/subscriptions","organizations_url":"https://api.github.com/users/Hypnosphi/orgs","repos_url":"https://api.github.com/users/Hypnosphi/repos","events_url":"https://api.github.com/users/Hypnosphi/events{/privacy}","received_events_url":"https://api.github.com/users/Hypnosphi/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cyclejs/collection/labels/in%20progress","name":"in progress","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-06-09T11:47:55Z","updated_at":"2016-06-10T03:13:27Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/cyclejs/collection/pulls/12","html_url":"https://github.com/cyclejs/collection/pull/12","diff_url":"https://github.com/cyclejs/collection/pull/12.diff","patch_url":"https://github.com/cyclejs/collection/pull/12.patch"},"body":"It's a quite common use case when a collection is built from fetched data (see https://github.com/cyclejs/collection/issues/3#issuecomment-222335503). Usually it comes in a form of items' state snapshot. `Collection.gather` takes a stream of those snapshots and turns into a stream of collections, using a set of rules:\r\n\r\n- items are keyed by `idAttribute` ('id' by default)\r\n- items that weren't present in the previous snapshot are added to collection\r\n- each added item tracks it's own state, turning the sequence of each field values into a source (`dropRepeats` is applied here)\r\n- item is removed from collection if it's no more present in a snapshot\r\n\r\nIt's some kind of an opposite to `Collection.pluck` which takes a stream of collections an turns it into a stream of sink state snapshots.\r\n\r\nExamples may be found in https://github.com/cyclejs/collection/blob/5f36bcf72ee8130b47a3267c61d54232c23109d3/test/gather-test.js and https://github.com/cyclejs/collection/blob/5f36bcf72ee8130b47a3267c61d54232c23109d3/examples/taskrunner/app.js . `run-script start/taskrunner` for demo."},"comment":{"url":"https://api.github.com/repos/cyclejs/collection/issues/comments/225083744","html_url":"https://github.com/cyclejs/collection/pull/12#issuecomment-225083744","issue_url":"https://api.github.com/repos/cyclejs/collection/issues/12","id":225083744,"user":{"login":"FeliciousX","id":701633,"avatar_url":"https://avatars.githubusercontent.com/u/701633?v=3","gravatar_id":"","url":"https://api.github.com/users/FeliciousX","html_url":"https://github.com/FeliciousX","followers_url":"https://api.github.com/users/FeliciousX/followers","following_url":"https://api.github.com/users/FeliciousX/following{/other_user}","gists_url":"https://api.github.com/users/FeliciousX/gists{/gist_id}","starred_url":"https://api.github.com/users/FeliciousX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FeliciousX/subscriptions","organizations_url":"https://api.github.com/users/FeliciousX/orgs","repos_url":"https://api.github.com/users/FeliciousX/repos","events_url":"https://api.github.com/users/FeliciousX/events{/privacy}","received_events_url":"https://api.github.com/users/FeliciousX/received_events","type":"User","site_admin":false},"created_at":"2016-06-10T03:13:27Z","updated_at":"2016-06-10T03:13:27Z","body":"Hmm I'm neutral with this implementation. it is lovely.. @Widdershin any thoughts on this?"}}
{"actor":{"display_login":"FeliciousX"}}