@elysiajs/websocket
Advanced tools
Comparing version 0.2.2 to 0.2.3
@@ -72,9 +72,11 @@ import { Elysia, getPath, Router, createValidationError, getSchemaValidator } from 'elysia'; | ||
catch (error) { } | ||
for (let i = 0; i < | ||
ws.data | ||
.transformMessage.length; i++) { | ||
const temp = ws.data.transformMessage[i](message); | ||
if (temp !== undefined) | ||
message = temp; | ||
} | ||
if (ws.data | ||
.transformMessage) | ||
for (let i = 0; i < | ||
ws.data | ||
.transformMessage.length; i++) { | ||
const temp = ws.data.transformMessage[i](message); | ||
if (temp !== undefined) | ||
message = temp; | ||
} | ||
if (ws.data.message?.Check(message) === false) | ||
@@ -81,0 +83,0 @@ return void ws.send(createValidationError('message', ws.data |
{ | ||
"name": "@elysiajs/websocket", | ||
"version": "0.2.2", | ||
"version": "0.2.3", | ||
"description": "Plugin for Elysia that add support for websocket", | ||
@@ -5,0 +5,0 @@ "author": { |
@@ -138,15 +138,19 @@ import type { ServerWebSocket, WebSocketHandler } from 'bun' | ||
for ( | ||
let i = 0; | ||
i < | ||
if ( | ||
(ws.data as ElysiaWSContext['data']) | ||
.transformMessage.length; | ||
i++ | ||
) { | ||
const temp: any = ( | ||
ws.data as ElysiaWSContext['data'] | ||
).transformMessage[i](message) | ||
.transformMessage | ||
) | ||
for ( | ||
let i = 0; | ||
i < | ||
(ws.data as ElysiaWSContext['data']) | ||
.transformMessage.length; | ||
i++ | ||
) { | ||
const temp: any = ( | ||
ws.data as ElysiaWSContext['data'] | ||
).transformMessage[i](message) | ||
if (temp !== undefined) message = temp | ||
} | ||
if (temp !== undefined) message = temp | ||
} | ||
@@ -153,0 +157,0 @@ if ( |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
26534
575