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: about 1 year 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 (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2022-10-28T01:05:15.000Z (over 3 years ago)
- Last Synced: 2025-04-07T18:03:50.030Z (about 1 year ago)
- Topics: ctrl, ctrlc, deno, deno-ctrlc, signals
- Language: TypeScript
- Homepage: https://deno.land/x/ctrlc
- Size: 16.6 KB
- Stars: 3
- Watchers: 2
- 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.