{"id":13415132,"url":"https://github.com/Andarist/callbag-pull-when","last_synced_at":"2025-03-14T22:32:42.698Z","repository":{"id":57193137,"uuid":"127901630","full_name":"Andarist/callbag-pull-when","owner":"Andarist","description":"👜 Callbag operator that pulls from source when provided listenable emits.","archived":false,"fork":false,"pushed_at":"2019-06-14T13:02:28.000Z","size":4,"stargazers_count":7,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-26T01:37:51.401Z","etag":null,"topics":["callbag","callbags","sampling"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Andarist.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-04-03T12:04:10.000Z","updated_at":"2019-10-02T14:36:58.000Z","dependencies_parsed_at":"2022-09-01T03:40:22.772Z","dependency_job_id":null,"html_url":"https://github.com/Andarist/callbag-pull-when","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Andarist%2Fcallbag-pull-when","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Andarist%2Fcallbag-pull-when/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Andarist%2Fcallbag-pull-when/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Andarist%2Fcallbag-pull-when/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Andarist","download_url":"https://codeload.github.com/Andarist/callbag-pull-when/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221513976,"owners_count":16835752,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["callbag","callbags","sampling"],"created_at":"2024-07-30T21:00:43.820Z","updated_at":"2024-10-26T08:31:09.753Z","avatar_url":"https://github.com/Andarist.png","language":"JavaScript","readme":"# callbag-pull-when\n\nCallbag operator that pulls (samples) from source when provided listenable emits. It's [`sampleWhen`](https://github.com/Andarist/callbag-sample-when)'s version - this one works with pullable source, while the other one works with listenables.\n\nIt works similar to [Rx's sample](http://reactivex.io/rxjs/class/es6/Observable.js~Observable.html#instance-method-sample).\n\n## Example\n\n```js\nimport forEach from 'callbag-for-each'\nimport fromIter from 'callbag-from-iter'\nimport pipe from 'callbag-pipe'\nimport pullWhen from 'callbag-pull-when'\nimport timer from 'callbag-timer'\n\npipe(\n  fromIter([10, 20, 30, 40]),\n  pullWhen(timer(1000, 2000)),\n  forEach(value =\u003e {\n    // will log 10 after 1 second, and 20, 30, 40 after 2 seconds from each other\n    console.log(value)\n  }),\n)\n```\n","funding_links":[],"categories":["Table Contents"],"sub_categories":["Combination operators"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAndarist%2Fcallbag-pull-when","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAndarist%2Fcallbag-pull-when","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAndarist%2Fcallbag-pull-when/lists"}