Cross platform handling of Ctrl-C signals.
deno run https://deno.land/x/ctrlc/example.ts
import { Disposable, setHandler } from "https://deno.land/x/ctrlc/mod.ts";
const ctrlc: Disposable = setHandler(() => {
Deno.exit();
});
console.log("press ctrl + c, will exit");
// loop
deno_ctrlc is released under the MIT License. See the bundled LICENSE file for details.