3 Object.defineProperty(exports, "__esModule", {
6 exports.default = wrapMiddleware;
7 function wrapMiddleware(middleware) {
8 return function (req, res, next) {
9 if (req.ws !== null && req.ws !== undefined) {
12 /* Unpack the `.ws` property and call the actual handler. */
13 middleware(req.ws, req, next);
15 /* If an error is thrown, let's send that on to any error handling */
19 /* This wasn't a WebSocket request, so skip this middleware. */