Skip to content

Instantly share code, notes, and snippets.

View jackwh's full-sized avatar
👌
LGTM

Jack Webb-Heller jackwh

👌
LGTM
View GitHub Profile
@jackwh
jackwh / Mercure.ts
Created November 17, 2024 20:41
Mercure subscription manager
import { arrayWrap } from "@/Support/Utilities/Arrays.ts";
import { numericHash } from "@/Components/Macros/Utils/NumericHash.ts";
import _ from "lodash";
export default class Mercure {
url: string | null;
debug = false;
hub: EventSource | undefined;
lastEventID: string | undefined;