This package has been archived, and as such it is read-only.
@effection-contrib/websocket@2.0.0Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
Built and signed on GitHub Actions
[Moved to effectionx namespace] Use the WebSocket API as an Effection resource.
This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers




JSR Score
100%
Published
2 months ago (2.0.0)
f
useWebSocket
Create a WebSocket resource using the native WebSocket constructor available on the current platform.
I
WebSocketResource
Handle to a
WebSocket
object
that can be consumed as an Effection stream. It has all the same properties as
the underlying WebSocket
apart from the event handlers. Instead, the resource
itself is a subscribale stream. When the socket is closed, the stream will
complete with a CloseEvent