{"id":22382391,"url":"https://github.com/jcoreio/web-streams-finally","last_synced_at":"2025-08-02T08:04:04.341Z","repository":{"id":261169777,"uuid":"883267514","full_name":"jcoreio/web-streams-finally","owner":"jcoreio","description":null,"archived":false,"fork":false,"pushed_at":"2025-04-14T19:20:29.000Z","size":211,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-14T20:28:46.032Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jcoreio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-11-04T17:01:48.000Z","updated_at":"2025-04-14T19:19:47.000Z","dependencies_parsed_at":"2024-11-05T04:26:10.716Z","dependency_job_id":"4dbf2f39-f35b-4e20-8bbb-0f70c74d715b","html_url":"https://github.com/jcoreio/web-streams-finally","commit_stats":null,"previous_names":["jcoreio/web-streams-finally"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/jcoreio/web-streams-finally","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcoreio%2Fweb-streams-finally","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcoreio%2Fweb-streams-finally/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcoreio%2Fweb-streams-finally/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcoreio%2Fweb-streams-finally/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jcoreio","download_url":"https://codeload.github.com/jcoreio/web-streams-finally/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcoreio%2Fweb-streams-finally/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268351003,"owners_count":24236328,"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","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-12-05T00:12:49.840Z","updated_at":"2025-08-02T08:04:04.314Z","avatar_url":"https://github.com/jcoreio.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @jcoreio/web-streams-finally\n\nuserland implementation of proposed finally() API for web streams\n\n[![CircleCI](https://circleci.com/gh/jcoreio/web-streams-finally.svg?style=svg)](https://circleci.com/gh/jcoreio/web-streams-finally)\n[![Coverage Status](https://codecov.io/gh/jcoreio/web-streams-finally/branch/master/graph/badge.svg)](https://codecov.io/gh/jcoreio/web-streams-finally)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n[![npm version](https://badge.fury.io/js/%40jcoreio%2Fweb-streams-finally.svg)](https://badge.fury.io/js/%40jcoreio%2Fweb-streams-finally)\n\n## `ReadableStreamWithFinally`\n\n```ts\nimport { ReadableStreamWithFinally } from '@jcoreio/web-streams-finally'\n\nconst stream = new ReadableStreamWithFinally({\n  async pull(controller) {\n    ...\n  },\n  async finally(why: 'close' | 'cancel' | 'error', reason?: any) {\n    // this will be called when the stream is closed, canceled, or errored\n  }\n})\n```\n\n## `ReadableStreamWithSignal`\n\n```ts\nimport { ReadableStreamWithSignal } from '@jcoreio/web-streams-finally'\n\nconst stream = new ReadableStreamWithSignal({\n  async pull(controller) {\n    await doSomething({\n      signal: controller.signal, // will be aborted when stream errors is closed, canceled, or errored\n    })\n    ...\n  },\n  async finally(why: 'close' | 'cancel' | 'error', reason?: any) {\n    // this will be called when the stream is closed, canceled, or errored\n  }\n})\n```\n\n## `WritableStreamWithFinally`\n\n```ts\nimport { WritableStreamWithFinally } from '@jcoreio/web-streams-finally'\n\nconst stream = new WritableStreamWithFinally({\n  async write(controller) {\n    ...\n  },\n  async finally(why: 'close' | 'abort' | 'error', reason?: any) {\n    // this will be called when the stream is closed, aborted, or errored\n  }\n})\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcoreio%2Fweb-streams-finally","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjcoreio%2Fweb-streams-finally","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcoreio%2Fweb-streams-finally/lists"}