{"action":"created","issue":{"url":"https://api.github.com/repos/rpominov/kefir/issues/132","labels_url":"https://api.github.com/repos/rpominov/kefir/issues/132/labels{/name}","comments_url":"https://api.github.com/repos/rpominov/kefir/issues/132/comments","events_url":"https://api.github.com/repos/rpominov/kefir/issues/132/events","html_url":"https://github.com/rpominov/kefir/issues/132","id":101711120,"number":132,"title":".bufferWithTimeOrCount (& .bufferWithCount?)","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},"labels":[{"url":"https://api.github.com/repos/rpominov/kefir/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/rpominov/kefir/labels/PR%20welcomed","name":"PR welcomed","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-18T17:47:36Z","updated_at":"2015-12-05T06:23:30Z","closed_at":null,"body":"[in RxJS](https://github.com/Reactive-Extensions/RxJS/blob/master/doc/api/core/operators/bufferwithtimeorcount.md)\r\n[in Bacon](https://github.com/baconjs/bacon.js#stream-bufferwithtimeorcount)\r\n\r\nWe probably need this. \r\n\r\nWe also lack `.bufferWithTime` and `.bufferWithCount`, but those are relatively easy to replicate using existing API:\r\n\r\n```js\r\n// .bufferWithTime\r\nfoo.bufferBy(Kefir.interval(1000))\r\n\r\n// .bufferWithCount\r\nlet i = 0\r\nfoo.bufferWhile(() => i++ % n !== 0)\r\n```\r\n\r\nAlthough having to store `i` state somewhere for `.bufferWithCount` also not very cool. Maybe we need this one too.\r\n\r\nPRs are welcome! :dancer:"},"comment":{"url":"https://api.github.com/repos/rpominov/kefir/issues/comments/162151576","html_url":"https://github.com/rpominov/kefir/issues/132#issuecomment-162151576","issue_url":"https://api.github.com/repos/rpominov/kefir/issues/132","id":162151576,"user":{"login":"mcmathja","id":5440410,"avatar_url":"https://avatars.githubusercontent.com/u/5440410?v=3","gravatar_id":"","url":"https://api.github.com/users/mcmathja","html_url":"https://github.com/mcmathja","followers_url":"https://api.github.com/users/mcmathja/followers","following_url":"https://api.github.com/users/mcmathja/following{/other_user}","gists_url":"https://api.github.com/users/mcmathja/gists{/gist_id}","starred_url":"https://api.github.com/users/mcmathja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcmathja/subscriptions","organizations_url":"https://api.github.com/users/mcmathja/orgs","repos_url":"https://api.github.com/users/mcmathja/repos","events_url":"https://api.github.com/users/mcmathja/events{/privacy}","received_events_url":"https://api.github.com/users/mcmathja/received_events","type":"User","site_admin":false},"created_at":"2015-12-05T06:23:30Z","updated_at":"2015-12-05T06:23:30Z","body":"I'd be interested in taking this. To clarify, expected behavior is that timer is reset to 0 after a flush initiated by count, but otherwise should run continuously between activation and deactivation?"}}