r/javascript • u/Bewinxed • Jun 09 '24
I made River.ts, a Declarative library for defining, emitting & consuming SSE Events in client & server.
https://github.com/Bewinxed/river.ts3
u/dbpcut Jun 09 '24
What does it mean to be a Based library?
0
u/Bewinxed Jun 09 '24
It’s just an expression:
2
u/dbpcut Jun 09 '24
Definitely familiar with it, just didn't understand it in this context (like if it was the name of a development group or something.)
Thanks! Definitely interesting, will take a peak. SSE isn't something many people reach for though it's super useful in a few contexts!
1
u/Bewinxed Jun 09 '24
Ah my bad, I’m just proud of it so that’s why i use it for my libs 😄
I like SSE because my needs are usually one way and are easier to set up vs sockets ( which were a pain in regular sveltekit which i work with usually)
3
u/Bewinxed Jun 09 '24
Page on NPM:
https://www.npmjs.com/package/river.ts?activeTab=readme
I made this for my own usage, let me know if you find it helpful :)
The server emitter is tested in Node-based environments, and is based on EventEmitter, I tested it in Sveltekit & Bun.
2
0
4
u/[deleted] Jun 09 '24
Why would i need to use this wrapper?