deno-notifier.ts is a Deno module for sending desktop notifications. It is written in pure TypeScript.
This module is still highly experimental! In particular, it has not been fully tested on Windows and Mac OS.
import { notify } from "https://deno.land/x/notifier/mod.ts";
await notify("This is a title", "This is a message");
await notify({
title: "Hello",
message: "World",
sound: "device-added", // only supported in Linux and macOS
});
This module also provides API inspired by WHATWG's Notifications API (WIP).
import { Notification } from "https://deno.land/x/notifier/whatwg/mod.ts";
new Notification("Hello", {
body: "World",
icon: "/path/to/icon.png",
});
You'll need to install one of the following:
notify-send
You'll need to install one of the following:
osascript
You'll need to install one of the following: