{"id":15366821,"url":"https://github.com/ryota-ka/xstream-tuplewise","last_synced_at":"2025-04-05T11:16:04.805Z","repository":{"id":57402314,"uuid":"307110578","full_name":"ryota-ka/xstream-tuplewise","owner":"ryota-ka","description":"An xstream operator that groups consecutive events into N-tuples","archived":false,"fork":false,"pushed_at":"2020-10-25T14:27:25.000Z","size":64,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-12T07:55:34.607Z","etag":null,"topics":["xstream","xstream-operator"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/xstream-tuplewise","language":"TypeScript","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/ryota-ka.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":"2020-10-25T13:56:32.000Z","updated_at":"2020-10-25T14:49:58.000Z","dependencies_parsed_at":"2022-09-15T18:40:28.978Z","dependency_job_id":null,"html_url":"https://github.com/ryota-ka/xstream-tuplewise","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryota-ka%2Fxstream-tuplewise","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryota-ka%2Fxstream-tuplewise/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryota-ka%2Fxstream-tuplewise/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryota-ka%2Fxstream-tuplewise/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ryota-ka","download_url":"https://codeload.github.com/ryota-ka/xstream-tuplewise/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247325696,"owners_count":20920715,"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":["xstream","xstream-operator"],"created_at":"2024-10-01T13:19:55.519Z","updated_at":"2025-04-05T11:16:04.744Z","avatar_url":"https://github.com/ryota-ka.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `xstream-tuplewise`\n\n![npm](https://img.shields.io/npm/v/xstream-tuplewise)\n\nAn xstream operator that groups consecutive events into N-tuples\n\n```typescript\nfunction tuplewise\u003cN extends number, T\u003e(n: N): ($: Stream\u003cT\u003e) =\u003e Stream\u003cT[] \u0026 { length: N }\u003e;\n```\n\n## Installation\n\nNote that [`xstream`](https://www.npmjs.com/package/xstream) is a peer dependencies of this library, which need to be installed separately.\n\n### Using [`npm`](https://www.npmjs.com/)\n\n```\n$ npm install xstream-tuplewise\n```\n\n### Using [`yarn`](https://yarnpkg.com/)\n\n```\n$ yarn add xstream-tuplewise\n```\n\n## Example\n\n### `tuplewise(0)`\n\n```\n---0---1-------2-------3-----------4--------|\n      tuplewise(0)\n[]-[]--[]------[]------[]----------[]-------|\n```\n\n### `tuplewise(1)`\n\n```\n---0---1-------2-------3-----------4--------|\n      tuplewise(1)\n---[0]-[1]-----[2]-----[3]---------[4]------|\n```\n\n### `tuplewise(2)`\n\n```\n---0---1-------2-------3-----------4--------|\n      tuplewise(2)\n-------[0,1]---[1,2]---[2,3]-------[3,4]----|\n```\n\n### `tuplewise(3)`\n\n```\n---0---1-------2-------3-----------4--------|\n      tuplewise(3)\n---------------[0,1,2]-[1,2,3]-----[2,3,4]--|\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryota-ka%2Fxstream-tuplewise","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryota-ka%2Fxstream-tuplewise","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryota-ka%2Fxstream-tuplewise/lists"}