Skip to content

Commit

Permalink
[minor] Add WebSocket.WebSocket{,Server} aliases (#1935)
Browse files Browse the repository at this point in the history
Add `WebSocket.WebSocket` as an alias for `WebSocket` and
`WebSocket.WebSocketServer` as an alias for `WebSocket.Server` to fix
name consistency and improve interoperability with the ES module
wrapper.

Refs: #1877
Refs: #1932
  • Loading branch information
lpinca committed Aug 17, 2021
1 parent c677aab commit d5e3549
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions index.js
Expand Up @@ -7,4 +7,7 @@ WebSocket.Server = require('./lib/websocket-server');
WebSocket.Receiver = require('./lib/receiver');
WebSocket.Sender = require('./lib/sender');

WebSocket.WebSocket = WebSocket;
WebSocket.WebSocketServer = WebSocket.Server;

module.exports = WebSocket;

0 comments on commit d5e3549

Please sign in to comment.