Skip to content

Latest commit

 

History

History
42 lines (27 loc) · 957 Bytes

README.md

File metadata and controls

42 lines (27 loc) · 957 Bytes

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 { onInterrupt } from "@117/interrupt";

onInterrupt(() => console.log("goodbye"));
onInterrupt(() => 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.