MCPcopy Create free account
hub / github.com/adcontextprotocol/adcp / stripNullBytesString

Function stripNullBytesString

server/src/addie/thread-service.ts:22–24  ·  view source on GitHub ↗
(s: string)

Source from the content-addressed store, hash-verified

20const NULL_BYTE_RE = new RegExp(NULL_BYTE, 'g');
21
22function stripNullBytesString(s: string): string {
23 return s.includes(NULL_BYTE) ? s.replace(NULL_BYTE_RE, '') : s;
24}
25
26function stripNullBytesFromJson(json: string): string {
27 // JSON.stringify encodes a null byte as a six-character backslash-u escape.

Callers 1

addMessageMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected