deno_ctrlc

tag Build Status license

Cross platform handling of Ctrl-C signals.

Permissions

  • --unstable

Usage

import { setHandler, Disposable } from "https://deno.land/x/ctrlc/mod.ts";

const ctrlc: Disposable = setHandler(() => {
    console.log('press ctrl + c, will exit');
    Deno.exit();
})

// loop

License

deno_ctrlc is released under the MIT License. See the bundled LICENSE file for details.