{"id":18013412,"url":"https://github.com/milly/deno-async-signal","last_synced_at":"2025-10-15T14:14:16.369Z","repository":{"id":244430004,"uuid":"815218571","full_name":"Milly/deno-async-signal","owner":"Milly","description":"Handling process signals asynchronously in Deno.","archived":false,"fork":false,"pushed_at":"2024-07-30T05:24:40.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-03T14:44:19.464Z","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/Milly.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2024-06-14T15:58:32.000Z","updated_at":"2024-07-30T05:23:36.000Z","dependencies_parsed_at":"2024-06-14T17:41:56.769Z","dependency_job_id":"942c23b0-a91c-48b7-92a0-b02414d212b0","html_url":"https://github.com/Milly/deno-async-signal","commit_stats":null,"previous_names":["milly/deno-async-signal"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Milly%2Fdeno-async-signal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Milly%2Fdeno-async-signal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Milly%2Fdeno-async-signal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Milly%2Fdeno-async-signal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Milly","download_url":"https://codeload.github.com/Milly/deno-async-signal/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247190583,"owners_count":20898783,"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-10-30T03:21:29.321Z","updated_at":"2025-10-15T14:14:11.318Z","avatar_url":"https://github.com/Milly.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# async-signal\n\n[![license:MIT](https://img.shields.io/github/license/Milly/deno-async-signal)](LICENSE)\n[![jsr](https://jsr.io/badges/@milly/async-signal)](https://jsr.io/@milly/async-signal)\n[![Test](https://github.com/Milly/deno-async-signal/actions/workflows/test.yml/badge.svg)](https://github.com/Milly/deno-async-signal/actions/workflows/test.yml)\n[![codecov](https://codecov.io/gh/Milly/deno-async-signal/graph/badge.svg?token=4OGRY1S7CN)](https://codecov.io/gh/Milly/deno-async-signal)\n\n`async-signal` provides functions for handling process signals asynchronously in [Deno][].\n\nDeno limitation: On Windows only `\"SIGINT\"` (Ctrl+C) and `\"SIGBREAK\"` (Ctrl+Break) are supported.\n\n[Deno]: https://deno.com/\n\n```typescript\nimport { asyncSignal, SignalError } from \"@milly/async-signal\";\nimport { delay } from \"@std/async\";\n\ntry {\n  // When the block exits, the signal trap is removed.\n  using intTrap = asyncSignal(\"SIGINT\");\n\n  // It resolves after 5 seconds or rejecets if Ctrl+C is pressed.\n  await Promise.race([intTrap, delay(5000)]);\n} catch (err) {\n  // `intTrap` rejecets with `SignalError`.\n  if (err instanceof SignalError) {\n    console.error(`${err.signal} is trapped`);\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmilly%2Fdeno-async-signal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmilly%2Fdeno-async-signal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmilly%2Fdeno-async-signal/lists"}