{"id":20181732,"url":"https://github.com/nichoth/pull-combine-latest","last_synced_at":"2025-04-10T05:10:07.376Z","repository":{"id":57332009,"uuid":"67908554","full_name":"nichoth/pull-combine-latest","owner":"nichoth","description":"Combine the latest values from many pull streams","archived":false,"fork":false,"pushed_at":"2017-04-06T01:57:26.000Z","size":21,"stargazers_count":6,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T06:22:09.201Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/nichoth.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":"2016-09-11T03:47:29.000Z","updated_at":"2022-03-13T23:51:50.000Z","dependencies_parsed_at":"2022-09-02T16:12:02.966Z","dependency_job_id":null,"html_url":"https://github.com/nichoth/pull-combine-latest","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nichoth%2Fpull-combine-latest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nichoth%2Fpull-combine-latest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nichoth%2Fpull-combine-latest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nichoth%2Fpull-combine-latest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nichoth","download_url":"https://codeload.github.com/nichoth/pull-combine-latest/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247809964,"owners_count":20999816,"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":[],"created_at":"2024-11-14T02:36:36.668Z","updated_at":"2025-04-10T05:10:07.351Z","avatar_url":"https://github.com/nichoth.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pull combine latest [![Build Status](https://travis-ci.org/nichoth/pull-combine-latest.svg?branch=master)](https://travis-ci.org/nichoth/pull-combine-latest)\n\nCombine the latest values from many streams. The algorithm waits until every stream has emitted a value, then emits a new array whenever one of the streams has more data.\n\n## install\n\n    $ npm install pull-combine-latest\n\n## example\n\n```js\nvar S = require('pull-stream')\nvar combineLatest = require('pull-combine-latest')\n\nS(\n    // pass an array of streams\n    combineLatest([S.values([1,2,3]), S.values(['a','b','c'])]),\n    S.log()\n)\n\nS(\n    // or pass streams as arguments\n    combineLatest(S.values([1,2,3]), S.values(['a','b','c'])),\n    S.log()\n)\n\n/*\noutput:\n\n    [1,'a']\n    [2,'a']\n    [2,'b']\n    [3,'b']\n    [3,'c']\n\n*/\n\n\n// new data is emitted as soon as it is received, so sync data will always\n// be emitted before async data\nS(\n    combineLatest(S.values([1,2,3]), asyncValues(['a','b','c'])),\n    S.log()\n)\n/*\n    [1,'a']\n    [2,'a']\n    [3,'a']\n    [3,'b']\n    [3,'c']\n*/\n\n\n// object map\nS(\n    combineLatest({\n        a: S.values([1,2,3]),\n        b: S.values([1,2,3])\n    }),\n    S.log()\n)\n/*\n    { a: 1, b: 1 }\n    { a: 2, b: 1 }\n    { a: 2, b: 2 }\n    { a: 3, b: 2 }\n    { a: 3, b: 3 }\n*/\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnichoth%2Fpull-combine-latest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnichoth%2Fpull-combine-latest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnichoth%2Fpull-combine-latest/lists"}