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

Method tryParse

packages/socket.io-parser/lib/index.ts:298–304  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

296 }
297
298 private tryParse(str) {
299 try {
300 return JSON.parse(str, this.opts.reviver);
301 } catch (e) {
302 return false;
303 }
304 }
305
306 private static isPayloadValid(type: PacketType, payload: any): boolean {
307 switch (type) {

Callers 1

decodeStringMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected