Matt W

Results 5 comments of Matt W

History could alternatively be maintained in a "central" history log, and then sessions and channels subscribe to this single history log. This may be more intuitive as, if a user...

Minimal history API: ```typescript import {createChannel, createHistory, createSession} from "better-sse"; import {channelA, channelB} from "./channels"; const history = createHistory([channelA, channelB]); app.get("/sse", (req, res) => { const session = createSession(req, res);...

Adding a note about limitations of the initial implementation: we currently use a [`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) from _event ID_ to _Event_ that allows for fast iteration, lookup and removal as well as...

@mepc36 If you're still looking for an SSE solution I have been working on a library that has been gaining some traction recently. 🙂 It has [comprehensive usage documentation](https://github.com/MatthewWid/better-sse/tree/master/docs) with...

1. Yes. You can use the [`Session#state`](https://github.com/MatthewWid/better-sse/blob/master/docs/api.md#sessionstate-state) property to add metadata to sessions (as well as [channels](https://github.com/MatthewWid/better-sse/blob/master/docs/api.md#channelstate-state)). If you're using TypeScript, you can add type information to the metadata object...