Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
@nestjs/websockets / factories / ws-params-factory.js
Size: Mime:
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const ws_paramtype_enum_1 = require("../enums/ws-paramtype.enum");
class WsParamsFactory {
    exchangeKeyForValue(type, args) {
        if (!args) {
            return null;
        }
        switch (type) {
            case ws_paramtype_enum_1.WsParamtype.SOCKET:
                return args[0];
            case ws_paramtype_enum_1.WsParamtype.PAYLOAD:
                return args[1];
            default:
                return null;
        }
    }
}
exports.WsParamsFactory = WsParamsFactory;