It's not. There's an under-appreciated NPM module which is/was shared by Socket.IO that only handles the low-level WebSocket protocol for NodeJS:
https://www.npmjs.com/package/websocket.io
You can use that, and the built-in WebSocket object in modern browsers.