MCPcopy
hub / github.com/socketio/socket.io / parseSessionId

Function parseSessionId

packages/engine.io/lib/server.ts:160–167  ·  view source on GitHub ↗
(data: string)

Source from the content-addressed store, hash-verified

158) => void;
159
160function parseSessionId(data: string): string | undefined {
161 try {
162 const parsed = JSON.parse(data);
163 if (typeof parsed.sid === "string") {
164 return parsed.sid;
165 }
166 } catch (e) {}
167}
168
169// Object.hasOwn() was introduced in Node.js 16.9
170function hasOwn(obj: Record<string, any>, key: string): boolean {

Callers 1

onWebTransportSessionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected