MCPcopy
hub / github.com/nestjs/nest / parseMessageContent

Method parseMessageContent

packages/microservices/client/client-rmq.ts:505–512  ·  view source on GitHub ↗
(content: Buffer)

Source from the content-addressed store, hash-verified

503 }
504
505 protected parseMessageContent(content: Buffer) {
506 const rawContent = content.toString();
507 try {
508 return JSON.parse(rawContent);
509 } catch {
510 return rawContent;
511 }
512 }
513}

Callers 1

listenerMethod · 0.95

Calls 2

parseMethod · 0.80
toStringMethod · 0.45

Tested by

no test coverage detected