Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
Built and signed on GitHub Actions
latest
117/interruptIt is unknown whether this package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
JSR Score
88%
Published
14 hours ago (1.0.2)
interrupt
A task queue for handling interrupt signals in Deno.
Contents
Features
- Register tasks to be executed in sequence upon interrupt signals.
- Handles
SIGINT
andSIGTERM
signals gracefully. - Provides a globally accessible task queue via import.
Install
For Deno:
$ deno add @117/interrupt
Example
import { addTask } from "@117/interrupt"; addTask(() => console.log("goodbye")); addTask(() => console.log("goodbye, for real this time")); console.log("app is running, press ctrl+c to exit");
Contributing
Feel free to contribute and PR to your 💖's content.
Built and signed on
View transparency logGitHub Actions
Add Package
deno add jsr:@117/interrupt
Import symbol
import * as interrupt from "@117/interrupt";
---- OR ----
Import directly with a jsr specifier
import * as interrupt from "jsr:@117/interrupt";
Add Package
npx jsr add @117/interrupt
Import symbol
import * as interrupt from "@117/interrupt";
Add Package
yarn dlx jsr add @117/interrupt
Import symbol
import * as interrupt from "@117/interrupt";
Add Package
pnpm dlx jsr add @117/interrupt
Import symbol
import * as interrupt from "@117/interrupt";
Add Package
bunx jsr add @117/interrupt
Import symbol
import * as interrupt from "@117/interrupt";