Skip to content

Usenet streaming with a WebDAV server and a SABnzbd-compatible API

C#
248 B
Raw Blame
export function receiveMessage(
    onMessage: (topic: string, message: string) => void
): (event: MessageEvent) => void {
    return (event) => {
        var parsed = JSON.parse(event.data);
        onMessage(parsed.Topic, parsed.Message);
    }
}