Skip to main content

Built and signed on GitHub Actions

It is unknown whether this package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
It is unknown whether this package works with Cloudflare Workers
It is unknown whether this package works with Node.js
It is unknown whether this package works with Deno
It is unknown whether this package works with Bun
It is unknown whether this package works with Browsers
JSR Score
88%
Published
14 hours ago (1.0.2)

interrupt

version status

A task queue for handling interrupt signals in Deno.

Contents

Features

  • Register tasks to be executed in sequence upon interrupt signals.
  • Handles SIGINT and SIGTERM 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
GitHub Actions
View transparency log

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";