Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/justjavac/deno_ctrlc
Cross platform handling of Ctrl-C signals.
https://github.com/justjavac/deno_ctrlc
ctrl ctrlc deno deno-ctrlc signals
Last synced: 24 days ago
JSON representation
Cross platform handling of Ctrl-C signals.
- Host: GitHub
- URL: https://github.com/justjavac/deno_ctrlc
- Owner: justjavac
- License: mit
- Created: 2020-08-14T03:24:19.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-10-28T01:05:15.000Z (about 2 years ago)
- Last Synced: 2024-11-22T06:17:50.208Z (about 1 month ago)
- Topics: ctrl, ctrlc, deno, deno-ctrlc, signals
- Language: TypeScript
- Homepage: https://deno.land/x/ctrlc
- Size: 16.6 KB
- Stars: 3
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# deno_ctrlc
Cross platform handling of Ctrl-C signals.
## Try it
```bash
deno run https://deno.land/x/ctrlc/example.ts
```## Usage
```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
```### License
[deno_ctrlc](https://github.com/justjavac/deno_ctrlc) is released under the MIT
License. See the bundled [LICENSE](./LICENSE) file for details.