isSubscribed

Bun

Symbol

ServerWebSocket.isSubscribed

isSubscribed(topic: string): boolean

Is the client subscribed to a topic?

@param topic

The topic name.

ws.subscribe("chat");
console.log(ws.isSubscribed("chat")); // true