Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
private ParseIncomingMessage = (aMsg: WebSocket.Data) => {
if (typeof (aMsg) === "string") {
const msgs = FromJSON(aMsg);
const emitMsgs = this._sorter.ParseIncomingMessages(msgs);
this.emit("message", emitMsgs);
} else {
throw new ButtplugMessageException("Unknown message transfer type");
}
}