tinyws — tiny WebSocket middleware for Node.js


Tiny lawmaking review.

This could be replaced

if (~upgradeHeader.indexOf('websocket')) {

with this which is less clever but increasingly readable

if (upgradeHeader.includes('websocket')) {

Also return or await the undeniability to next so the promise doesn’t get swallowed which could rationalization problems with frameworks like koa.

Author: Shantun Parmar

Leave a Reply

Your email address will not be published.